From: Hallvard Furuseth Date: Mon, 11 Feb 2008 20:56:46 +0000 (+0000) Subject: ITS#5328 - return LDAP result code from config_back_entry_get (back-config bi_entry_g... X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~166 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a703aba836b6f5fae97f134c1ca59525161ffd7;p=openldap ITS#5328 - return LDAP result code from config_back_entry_get (back-config bi_entry_get_rw) --- diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 0be46d6b60..b65928e9a8 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -5298,18 +5298,23 @@ int config_back_entry_get( { CfBackInfo *cfb; CfEntryInfo *ce, *last; + int rc = LDAP_NO_SUCH_OBJECT; cfb = (CfBackInfo *)op->o_bd->be_private; ce = config_find_base( cfb->cb_root, ndn, &last ); if ( ce ) { *ent = ce->ce_entry; - if ( *ent && oc && !is_entry_objectclass_or_sub( *ent, oc ) ) { - *ent = NULL; + if ( *ent ) { + rc = LDAP_SUCCESS; + if ( oc && !is_entry_objectclass_or_sub( *ent, oc ) ) { + rc = LDAP_NO_SUCH_ATTRIBUTE; + *ent = NULL; + } } } - return ( *ent == NULL ? 1 : 0 ); + return rc; } static void