This commit is contained in:
Kurt Zeilenga 2005-10-14 21:37:14 +00:00
parent dfa28bfb41
commit 40ff060f83
2 changed files with 10 additions and 8 deletions

View File

@ -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): "

View File

@ -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