mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-06 23:19:59 -05:00
Fix unlock bug in connection_read/write. Fix connection_read() to
ignore input when connection is closing.
This commit is contained in:
parent
f1e15ddfa2
commit
f3774d6ea3
1 changed files with 12 additions and 0 deletions
|
|
@ -553,9 +553,20 @@ int connection_read(int s)
|
|||
Debug( LDAP_DEBUG_ANY,
|
||||
"connection_read(%d): no connection!\n",
|
||||
s, 0, 0 );
|
||||
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
||||
return -1;
|
||||
}
|
||||
|
||||
if( c->c_conn_state == SLAP_C_CLOSING ) {
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"connection_read(%d): closing, ignoring input for id=%ld\n",
|
||||
s, c->c_connid, 0 );
|
||||
|
||||
connection_return( c );
|
||||
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
||||
return 0;
|
||||
}
|
||||
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"connection_read(%d): checking for input on id=%ld\n",
|
||||
s, c->c_connid, 0 );
|
||||
|
|
@ -755,6 +766,7 @@ int connection_write(int s)
|
|||
Debug( LDAP_DEBUG_ANY,
|
||||
"connection_write(%d): no connection!\n",
|
||||
s, 0, 0 );
|
||||
ldap_pvt_thread_mutex_unlock( &connections_mutex );
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue