]> git.sur5r.net Git - openldap/commitdiff
fix deadlock in case of bind error; propagate error as appropriate
authorPierangelo Masarati <ando@openldap.org>
Sat, 2 Dec 2006 17:09:20 +0000 (17:09 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 2 Dec 2006 17:09:20 +0000 (17:09 +0000)
servers/slapd/back-meta/search.c

index 39e886b8222f3c8f56c0002df976026e407e0185..c5627d56d1e6e1a66073c96e2906e9521b528ce7 100644 (file)
@@ -271,7 +271,7 @@ other:;
                LDAP_BACK_CONN_BINDING_CLEAR( msc );
                if ( META_BACK_ONERR_STOP( mi ) ) {
                        LDAP_BACK_CONN_TAINTED_SET( mc );
-                       meta_back_release_conn( op, mc );
+                       meta_back_release_conn_lock( op, mc, 0 );
                        *mcp = NULL;
 
                        retcode = META_SEARCH_ERR;
@@ -323,9 +323,10 @@ meta_search_dobind_result(
        if ( rc != LDAP_SUCCESS ) {
                if ( META_BACK_ONERR_STOP( mi ) ) {
                        LDAP_BACK_CONN_TAINTED_SET( mc );
-                       meta_back_release_conn( op, mc );
+                       meta_back_release_conn_lock( op, mc, 0 );
                        *mcp = NULL;
                        retcode = META_SEARCH_ERR;
+                       rs->sr_err = rc;
 
                } else if ( META_BACK_ONERR_REPORT( mi ) ) {
                        candidates[ candidate ].sr_err = rc;