]> git.sur5r.net Git - openldap/commitdiff
check mutex in connection_write()
authorHoward Chu <hyc@openldap.org>
Thu, 29 Jan 2009 22:43:18 +0000 (22:43 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 29 Jan 2009 22:43:18 +0000 (22:43 +0000)
servers/slapd/connection.c

index 9e2130d6de68917c410a1674d445a1ecbc230e0a..969fcf1cc55be7bdcff9a80385190f3542afcadd 100644 (file)
@@ -1859,7 +1859,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 );