]> git.sur5r.net Git - openldap/commitdiff
Fix error message propagation
authorHoward Chu <hyc@openldap.org>
Mon, 15 Oct 2007 10:22:51 +0000 (10:22 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 15 Oct 2007 10:22:51 +0000 (10:22 +0000)
servers/slapd/back-bdb/config.c
servers/slapd/bconfig.c

index c1a29e527efec7f05d840d083339f065d3597782..32291d7d054e773848e191cc913088d1a1fc9886 100644 (file)
@@ -633,8 +633,9 @@ bdb_cf_gen( ConfigArgs *c )
                }
                ch_free( testpath );
                if ( !f ) {
-                       snprintf( c->cr_msg, sizeof( c->cr_msg ), "invalid path: %s", strerror( errno ));
-                       Debug( LDAP_DEBUG_ANY, "%s: %s\n", c->log, c->cr_msg, 0 );
+                       snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: invalid path: %s",
+                               c->log, strerror( errno ));
+                       Debug( LDAP_DEBUG_ANY, "%s\n", c->cr_msg, 0, 0 );
                        return -1;
                }
 
index dd9ac913b72690da90b9d83b568b1e52241b5bf1..5aa496f74d1da8b950987fd146bbe4e57bf849d8 100644 (file)
@@ -4826,6 +4826,7 @@ config_modify_internal( CfEntryInfo *ce, Operation *op, SlapReply *rs,
 out:
        /* Undo for a failed operation */
        if ( rc != LDAP_SUCCESS ) {
+               ConfigReply msg = ca->reply;
                for ( s = save_attrs; s; s = s->a_next ) {
                        if ( s->a_flags & SLAP_ATTR_IXDEL ) {
                                s->a_flags &= ~(SLAP_ATTR_IXDEL|SLAP_ATTR_IXADD);
@@ -4862,6 +4863,7 @@ out:
                                }
                        }
                }
+               ca->reply = msg;
        }
 
        if ( ca->cleanup )