From: Howard Chu Date: Tue, 25 May 2004 04:54:32 +0000 (+0000) Subject: Fix entry_get, only check mapped attr if attr was provided X-Git-Tag: OPENDLAP_REL_ENG_2_2_MP~328 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7488f557cd22e1afce3e321f06ed836701b09371;p=openldap Fix entry_get, only check mapped attr if attr was provided --- diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 9b12268b7a..6da4f608d9 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -571,17 +571,17 @@ ldap_back_entry_get( rc = 1; goto cleanup; } + is_oc = (strcasecmp("objectclass", mapped.bv_val) == 0); + if (oc && !is_oc) { + gattr[0] = "objectclass"; + gattr[1] = mapped.bv_val; + gattr[2] = NULL; + } else { + gattr[0] = mapped.bv_val; + gattr[1] = NULL; + } } - is_oc = (strcasecmp("objectclass", mapped.bv_val) == 0); - if (oc && !is_oc) { - gattr[0] = "objectclass"; - gattr[1] = mapped.bv_val; - gattr[2] = NULL; - } else { - gattr[0] = mapped.bv_val; - gattr[1] = NULL; - } if (oc) { char *ptr; ldap_back_map(&li->rwmap.rwm_oc, &oc->soc_cname, &mapped,