]> git.sur5r.net Git - openldap/commitdiff
Propagate config errors back to caller.
authorHoward Chu <hyc@openldap.org>
Fri, 6 May 2005 20:20:45 +0000 (20:20 +0000)
committerHoward Chu <hyc@openldap.org>
Fri, 6 May 2005 20:20:45 +0000 (20:20 +0000)
servers/slapd/back-ldif/ldif.c
servers/slapd/bconfig.c

index 636ce7ee6b5fbca997e999c029b27c14cb04284c..57ad89e43b5691eb86de668d00ad120ad348aecb 100644 (file)
@@ -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) {
index 40b339c344d23036023b2d78db35248b7ae476e8..8518613d363d36549eba7680d517ea6af4db8405 100644 (file)
@@ -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