فهرست منبع

Merge pull request #8313 from RussWhitehead/dupRes60

HPCC-15109 LDAP Resources listed twice in ECLWatch

Reviewed-By: Rodrigo Pastrana <rodrigo.pastrana@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 9 سال پیش
والد
کامیت
951acf949f
1فایلهای تغییر یافته به همراه12 افزوده شده و 16 حذف شده
  1. 12 16
      system/security/LdapSecurity/ldapconnection.cpp

+ 12 - 16
system/security/LdapSecurity/ldapconnection.cpp

@@ -3239,28 +3239,24 @@ public:
             {
                 StringBuffer descbuf;
                 StringBuffer curname;
-                CLDAPGetAttributesWrapper   atts(ld, message);
-                for ( attribute = atts.getFirst();
-                      attribute != NULL;
-                      attribute = atts.getNext())
+
+                CLDAPGetValuesLenWrapper vals(ld, message, attribute);
+                if (vals.hasValues())
                 {
-                    CLDAPGetValuesLenWrapper vals(ld, message, attribute);
-                    if (vals.hasValues())
+                    const char* val = vals.queryCharValue(0);
+                    if(val != NULL)
                     {
-                        const char* val = vals.queryCharValue(0);
-                        if(val != NULL)
+                        if(stricmp(attribute, fldname) == 0)
                         {
-                            if(stricmp(attribute, fldname) == 0)
-                            {
-                                curname.append(val);
-                            }
-                            else if(stricmp(attribute, "description") == 0)
-                            {
-                                descbuf.append(val);
-                            }
+                            curname.append(val);
+                        }
+                        else if(stricmp(attribute, "description") == 0)
+                        {
+                            descbuf.append(val);
                         }
                     }
                 }
+
                 if(curname.length() == 0)
                     continue;
                 StringBuffer resourcename;