Skip to content
Snippets Groups Projects
Commit f181388a authored by Howard Chu's avatar Howard Chu
Browse files

Fix ITS#1655, don't retrieve sd until we've checked for valid c_sb.

parent 6b0fb09e
No related branches found
No related tags found
No related merge requests found
......@@ -234,15 +234,15 @@ static Connection* connection_get( ber_socket_t s )
ber_socket_t i, sd;
for(i=0; i<dtblsize; i++) {
ber_sockbuf_ctrl( connections[i].c_sb,
LBER_SB_OPT_GET_FD, &sd );
if( connections[i].c_struct_state == SLAP_C_UNINITIALIZED ) {
assert( connections[i].c_conn_state == SLAP_C_INVALID );
assert( connections[i].c_sb == 0 );
break;
}
ber_sockbuf_ctrl( connections[i].c_sb,
LBER_SB_OPT_GET_FD, &sd );
if( connections[i].c_struct_state == SLAP_C_UNUSED ) {
assert( connections[i].c_conn_state == SLAP_C_INVALID );
assert( sd == AC_SOCKET_INVALID );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment