]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorKurt Zeilenga <kurt@openldap.org>
Fri, 14 Oct 2005 21:37:14 +0000 (21:37 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Fri, 14 Oct 2005 21:37:14 +0000 (21:37 +0000)
servers/slapd/connection.c
servers/slapd/daemon.c

index 309d82fa1d130e0a23f30920933305aad7311004..f4ce8f1d8362b20c7ae2c29c8a63e5ca3b7792d8 100644 (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): "
index d5823b4d576efaacb18cfd30de94bbcb4114ea23..9af0c469464bc6d16e36521b5a5588c63f2e2024 100644 (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