ITS#6361 remove asserts

This commit is contained in:
Howard Chu 2009-11-13 23:48:51 +00:00
parent fdf55ac80e
commit d6fbe1c7ca
2 changed files with 14 additions and 6 deletions

View File

@ -783,7 +783,9 @@ void connection_closing( Connection *c, const char *why )
{
assert( connections != NULL );
assert( c != NULL );
assert( c->c_struct_state == SLAP_C_USED );
if ( c->c_struct_state != SLAP_C_USED ) return;
assert( c->c_conn_state != SLAP_C_INVALID );
/* c_mutex must be locked by caller */
@ -816,7 +818,9 @@ connection_close( Connection *c )
{
assert( connections != NULL );
assert( c != NULL );
assert( c->c_struct_state == SLAP_C_USED );
if ( c->c_struct_state != SLAP_C_USED ) return;
assert( c->c_conn_state == SLAP_C_CLOSING );
/* NOTE: c_mutex should be locked by caller */

View File

@ -989,12 +989,16 @@ slapd_clr_read( ber_socket_t s, int wake )
void
slapd_set_read( ber_socket_t s, int wake )
{
int do_wake = 1;
ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
assert( SLAP_SOCK_IS_ACTIVE( s ));
if (!SLAP_SOCK_IS_READ( s )) SLAP_SOCK_SET_READ( s );
if( SLAP_SOCK_IS_ACTIVE( s ) && !SLAP_SOCK_IS_READ( s )) {
SLAP_SOCK_SET_READ( s );
} else {
do_wake = 0;
}
ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
if ( do_wake )
WAKE_LISTENER(wake);
}