]> git.sur5r.net Git - openldap/commitdiff
Fix WAKE_LISTENER
authorHoward Chu <hyc@openldap.org>
Sun, 15 Jan 2006 15:40:53 +0000 (15:40 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 15 Jan 2006 15:40:53 +0000 (15:40 +0000)
servers/slapd/daemon.c

index 03eaaa698b7b2672b3587cc500f06683e9ddfdda..0e9f220b707700048235e79ec516447982c8fff9 100644 (file)
@@ -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;