From: Howard Chu Date: Fri, 8 Sep 2006 23:30:31 +0000 (+0000) Subject: ITS#4667 fix assert in connection_next() for PENDING connections X-Git-Tag: OPENLDAP_REL_ENG_2_3_MP~184 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=da6a4bcd3e44aad30d4278fb4f7610582799b967;p=openldap ITS#4667 fix assert in connection_next() for PENDING connections --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 367ddf209e..f989d8ddaa 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -914,6 +914,7 @@ Connection* connection_next( Connection *c, ber_socket_t *index ) ldap_pvt_thread_mutex_lock( &connections_mutex ); for(; *index < dtblsize; (*index)++) { + int c_struct; if( connections[*index].c_struct_state == SLAP_C_UNINITIALIZED ) { assert( connections[*index].c_conn_state == SLAP_C_INVALID ); break; @@ -936,7 +937,10 @@ Connection* connection_next( Connection *c, ber_socket_t *index ) break; } - assert( connections[*index].c_struct_state == SLAP_C_UNUSED ); + c_struct = connections[*index].c_struct_state; + if ( c_struct == SLAP_C_PENDING ) + continue; + assert( c_struct == SLAP_C_UNUSED ); assert( connections[*index].c_conn_state == SLAP_C_INVALID ); }