]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
ITS#4088 force cursors to use same locker
[openldap] / servers / slapd / connection.c
index 16af90101e0552c773b2e899823859c69e1d5c6d..89de750871e83e2aba75a4f7e428cbdee03ee68a 100644 (file)
@@ -1517,7 +1517,7 @@ int connection_read(ber_socket_t s)
                rc = ldap_pvt_tls_accept( c->c_sb, slap_tls_ctx );
                if ( rc < 0 ) {
                        Debug( LDAP_DEBUG_TRACE,
-                               "connection_read(%d): TLS accept error "
+                               "connection_read(%d): TLS accept failure "
                                "error=%d id=%lu, closing\n",
                                s, rc, c->c_connid );
 
@@ -1545,6 +1545,9 @@ int connection_read(ber_socket_t s)
 #endif
 
                        connection_close( c );
+                       connection_return( c );
+                       ldap_pvt_thread_mutex_unlock( MCA_GET_CONN_MUTEX(s) );
+                       return 0;
 
                } else if ( rc == 0 ) {
                        void *ssl;
@@ -1611,11 +1614,6 @@ int connection_read(ber_socket_t s)
                                s, rc, c->c_connid );
 
                        /* connections_mutex and c_mutex are locked */
-
-#ifdef SLAP_LIGHTWEIGHT_DISPATCHER
-                       slapd_set_read( s, 1 );
-#endif
-
                        connection_closing( c, "SASL layer install failure" );
                        connection_close( c );
                        connection_return( c );