From da6a4bcd3e44aad30d4278fb4f7610582799b967 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 8 Sep 2006 23:30:31 +0000 Subject: [PATCH] ITS#4667 fix assert in connection_next() for PENDING connections --- servers/slapd/connection.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ); } -- 2.39.5