From: Howard Chu Date: Sun, 15 Jan 2006 15:40:53 +0000 (+0000) Subject: Fix WAKE_LISTENER X-Git-Tag: OPENLDAP_REL_ENG_2_4_BP~302 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9b2ee679e8d0298cc01c1b99637d277ae5592c8c;p=openldap Fix WAKE_LISTENER --- diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c index 03eaaa698b..0e9f220b70 100644 --- a/servers/slapd/daemon.c +++ b/servers/slapd/daemon.c @@ -82,11 +82,19 @@ static ber_socket_t wake_sds[2]; static int emfile; static volatile int waking; +#ifdef NO_THREADS #define WAKE_LISTENER(w) do { \ if ((w) && ++waking < 5) { \ tcp_write( wake_sds[1], "0", 1 ); \ } \ } while(0) +#else +#define WAKE_LISTENER(w) do { \ + if (w) { \ + tcp_write( wake_sds[1], "0", 1 ); \ + } \ +} while(0) +#endif volatile sig_atomic_t slapd_shutdown = 0; volatile sig_atomic_t slapd_gentle_shutdown = 0;