]> git.sur5r.net Git - openldap/commitdiff
Fix - failed Binds could leave a closing connection open.
authorHoward Chu <hyc@openldap.org>
Thu, 9 Nov 2006 01:42:21 +0000 (01:42 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 9 Nov 2006 01:42:21 +0000 (01:42 +0000)
servers/slapd/connection.c

index 4662f98cebd5be4c03af22fdc0985f9fe527081a..f117fdd058dcba742279bc13b827589525069119 100644 (file)
@@ -1755,7 +1755,8 @@ static int connection_bind_cleanup_cb( Operation *op, SlapReply *rs )
 static int connection_bind_cb( Operation *op, SlapReply *rs )
 {
        ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
-       op->o_conn->c_conn_state = SLAP_C_ACTIVE;
+       if ( op->o_cnn->c_conn_state == SLAP_C_BINDING )
+               op->o_conn->c_conn_state = SLAP_C_ACTIVE;
        op->o_conn->c_sasl_bind_in_progress =
                ( rs->sr_err == LDAP_SASL_BIND_IN_PROGRESS );