mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
ITS#9831 Advance connections[index] correctly
This commit is contained in:
parent
47069fee55
commit
15573c72fc
1 changed files with 2 additions and 1 deletions
|
|
@ -871,13 +871,14 @@ Connection* connection_next( Connection *c, ber_socket_t *index )
|
||||||
|
|
||||||
for(; *index < dtblsize; (*index)++) {
|
for(; *index < dtblsize; (*index)++) {
|
||||||
if( connections[*index].c_sb ) {
|
if( connections[*index].c_sb ) {
|
||||||
c = &connections[(*index)++];
|
c = &connections[*index];
|
||||||
ldap_pvt_thread_mutex_lock( &c->c_mutex );
|
ldap_pvt_thread_mutex_lock( &c->c_mutex );
|
||||||
if ( c->c_conn_state == SLAP_C_INVALID ) {
|
if ( c->c_conn_state == SLAP_C_INVALID ) {
|
||||||
ldap_pvt_thread_mutex_unlock( &c->c_mutex );
|
ldap_pvt_thread_mutex_unlock( &c->c_mutex );
|
||||||
c = NULL;
|
c = NULL;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
(*index)++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue