浏览代码

Signed-off-by: Russ Whitehead <william.whitehead@lexisnexis.com>

Russ Whitehead 9 年之前
父节点
当前提交
122462c1f2
共有 1 个文件被更改,包括 12 次插入13 次删除
  1. 12 13
      system/security/LdapSecurity/ldapconnection.cpp

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

@@ -3225,25 +3225,24 @@ public:
             {
                 StringBuffer descbuf;
                 StringBuffer curname;
-                CLDAPGetAttributesWrapper   atts(ld, message);
+
+                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;