From 9b2ee679e8d0298cc01c1b99637d277ae5592c8c Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 15 Jan 2006 15:40:53 +0000 Subject: [PATCH] Fix WAKE_LISTENER --- servers/slapd/daemon.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.39.5