From: Howard Chu Date: Fri, 6 May 2005 20:20:45 +0000 (+0000) Subject: Propagate config errors back to caller. X-Git-Tag: OPENLDAP_AC_BP~709 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d7b27fcca5e3c65662a9bf275d462ac8b8764dc;p=openldap Propagate config errors back to caller. --- diff --git a/servers/slapd/back-ldif/ldif.c b/servers/slapd/back-ldif/ldif.c index 636ce7ee6b..57ad89e43b 100644 --- a/servers/slapd/back-ldif/ldif.c +++ b/servers/slapd/back-ldif/ldif.c @@ -349,7 +349,7 @@ static int r_enum_tree(enumCookie *ck, struct berval *path, ck->op->oq_search.rs_scope == LDAP_SCOPE_ONELEVEL ? LDAP_SCOPE_BASE : LDAP_SCOPE_SUBTREE ); - send_search_reference( ck->op, ck->rs ); + rc = send_search_reference( ck->op, ck->rs ); ber_bvarray_free( ck->rs->sr_ref ); ber_bvarray_free( erefs ); @@ -360,9 +360,11 @@ static int r_enum_tree(enumCookie *ck, struct berval *path, ck->rs->sr_entry = e; ck->rs->sr_attrs = ck->op->ors_attrs; ck->rs->sr_flags = REP_ENTRY_MODIFIABLE; - send_search_entry(ck->op, ck->rs); + rc = send_search_entry(ck->op, ck->rs); } fd = 1; + if ( rc ) + goto leave; } else { /* Queueing up for tool mode */ if(ck->entries == NULL) { diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 40b339c344..8518613d36 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -2408,7 +2408,7 @@ config_setup_ldif( BackendDB *be, const char *dir, int readit ) { ConfigArgs c = {0}; ConfigTable *ct; char *argv[3]; - int rc; + int rc = 0; slap_callback cb = { NULL, config_ldif_resp, NULL, NULL }; Connection conn = {0}; char opbuf[OPERATION_BUFFER_SIZE]; @@ -2488,12 +2488,12 @@ config_setup_ldif( BackendDB *be, const char *dir, int readit ) { cb.sc_private = cfb; op->o_bd = &cfb->cb_db; - op->o_bd->be_search( op, &rs ); + rc = op->o_bd->be_search( op, &rs ); } cfb->cb_use_ldif = 1; - return 0; + return rc; } static int