From: Kurt Zeilenga Date: Fri, 14 Oct 2005 21:37:14 +0000 (+0000) Subject: cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~255 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=40ff060f833ff2a456579cc013d050e67335288b;p=openldap cleanup --- diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 309d82fa1d..f4ce8f1d83 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -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): " diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index d5823b4d57..9af0c46946 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -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