mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-12 10:54:48 +08:00
cleanup
This commit is contained in:
parent
dfa28bfb41
commit
40ff060f83
@ -1409,7 +1409,7 @@ void connection_client_stop(
|
||||
}
|
||||
|
||||
#ifdef SLAP_LIGHTWEIGHT_LISTENER
|
||||
void* connection_processing_thread( void* ctx, void* argv )
|
||||
static void* connection_read_thread( void* ctx, void* argv )
|
||||
{
|
||||
int rc ;
|
||||
Operation* new_op = NULL;
|
||||
@ -1434,7 +1434,7 @@ void* connection_processing_thread( void* ctx, void* argv )
|
||||
return (void*)rc;
|
||||
}
|
||||
|
||||
int connection_processing_activate( ber_socket_t s )
|
||||
int connection_read_activate( ber_socket_t s )
|
||||
{
|
||||
int status;
|
||||
|
||||
@ -1446,7 +1446,7 @@ int connection_processing_activate( ber_socket_t s )
|
||||
if( !slapd_suspend( s ) ) return 0;
|
||||
|
||||
status = ldap_pvt_thread_pool_submit( &connection_pool,
|
||||
connection_processing_thread, (void *) s );
|
||||
connection_read_thread, (void *) s );
|
||||
|
||||
if( status != 0 ) {
|
||||
Debug( LDAP_DEBUG_ANY, "connection_processing_activiate(%d): "
|
||||
|
@ -1413,10 +1413,8 @@ slapd_handle_listener(
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
|
||||
|
||||
/* newly accepted stream should not be in any of the FD SETS */
|
||||
assert( SLAP_SOCK_NOT_ACTIVE( s ));
|
||||
|
||||
ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
|
||||
#endif
|
||||
|
||||
@ -2016,13 +2014,17 @@ slapd_daemon_task(
|
||||
Debug( LDAP_DEBUG_CONNS,
|
||||
"daemon: write active on %d\n",
|
||||
wd, 0, 0 );
|
||||
|
||||
#ifdef SLAP_LIGHTWEIGHT_LISTENER
|
||||
#else
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: it is possible that the connection was closed
|
||||
* and that the stream is now inactive.
|
||||
* connection_write() must validitate the stream is still
|
||||
* active.
|
||||
*/
|
||||
|
||||
if ( connection_write( wd ) < 0 ) {
|
||||
if ( SLAP_EVENT_IS_READ( wd )) {
|
||||
SLAP_EVENT_CLR_READ( (unsigned) wd );
|
||||
@ -2053,7 +2055,7 @@ slapd_daemon_task(
|
||||
*/
|
||||
|
||||
#ifdef SLAP_LIGHTWEIGHT_LISTENER
|
||||
connection_processing_activate( rd );
|
||||
connection_read_activate( rd );
|
||||
#else
|
||||
if ( connection_read( rd ) < 0 ) {
|
||||
slapd_close( rd );
|
||||
@ -2161,7 +2163,7 @@ slapd_daemon_task(
|
||||
*/
|
||||
|
||||
#ifdef SLAP_LIGHTWEIGHT_LISTENER
|
||||
connection_processing_activate( fd );
|
||||
connection_read_activate( fd );
|
||||
#else
|
||||
if ( connection_read( fd ) < 0 ) slapd_close( fd );
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user