From e470116ab314960a071e98d3c348bd7b8d1cbdb1 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Thu, 3 Nov 2005 18:50:04 +0000 Subject: [PATCH] fix -USLAP_LIGHTWEIGHT_DISPACTHER sl_busy issue --- servers/slapd/daemon.c | 9 ++++++++- servers/slapd/slap.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 857a6bb1ca..49007b612d 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -1756,7 +1756,12 @@ slapd_daemon_task( if ( lr->sl_sd == AC_SOCKET_INVALID ) continue; - if ( lr->sl_mute || lr->sl_busy ) { +#ifdef SLAP_LIGHTWEIGHT_DISPATCHER + if ( lr->sl_mute || lr->sl_busy ) +#else + if ( lr->sl_mute ) +#endif + { SLAP_SOCK_CLR_READ( lr->sl_sd ); } else { SLAP_SOCK_SET_READ( lr->sl_sd ); @@ -1823,12 +1828,14 @@ slapd_daemon_task( continue; } +#ifdef SLAP_LIGHTWEIGHT_DISPATCHER if ( lr->sl_busy ) { Debug( LDAP_DEBUG_CONNS, "daemon: select: listen=%d busy\n", lr->sl_sd, 0, 0 ); continue; } +#endif Debug( LDAP_DEBUG_CONNS, "daemon: select: listen=%d active_threads=%d tvp=%s\n", diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index c4b35ad525..4514a45d18 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -2744,7 +2744,7 @@ struct slap_listener { #endif int sl_mute; /* Listener is temporarily disabled due to emfile */ #ifdef SLAP_LIGHTWEIGHT_DISPATCHER - int sl_busy; /* Listener is busy (accept thread activated */ + int sl_busy; /* Listener is busy (accept thread activated) */ #endif ber_socket_t sl_sd; Sockaddr sl_sa; -- 2.39.5