]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/connection.c
ITS#6002
[openldap] / servers / slapd / connection.c
index abd6907a62bf7e0b09aeaff7dbff2decee669c27..8675dd72065209ea67a6e44a0b5d57141d75e948 100644 (file)
@@ -1237,7 +1237,7 @@ int connection_read_activate( ber_socket_t s )
         * thread reads data on it. Otherwise the listener thread will repeatedly
         * submit the same event on it to the pool.
         */
-       rc = slapd_ack_read( s, 0 );
+       rc = slapd_clr_read( s, 0 );
        if ( rc )
                return rc;
 
@@ -1841,7 +1841,7 @@ int connection_write(ber_socket_t s)
 
        assert( connections != NULL );
 
-       slapd_ack_write( s, 0 );
+       slapd_clr_write( s, 0 );
 
        c = connection_get( s );
        if( c == NULL ) {
@@ -1856,7 +1856,9 @@ int connection_write(ber_socket_t s)
        Debug( LDAP_DEBUG_TRACE,
                "connection_write(%d): waking output for id=%lu\n",
                s, c->c_connid, 0 );
+       ldap_pvt_thread_mutex_lock( &c->c_write2_mutex );
        ldap_pvt_thread_cond_signal( &c->c_write2_cv );
+       ldap_pvt_thread_mutex_unlock( &c->c_write2_mutex );
 
        if ( ber_sockbuf_ctrl( c->c_sb, LBER_SB_OPT_NEEDS_READ, NULL ) ) {
                slapd_set_read( s, 1 );