]> git.sur5r.net Git - openldap/commitdiff
ITS#3760 don't select on uninit'd writefds
authorHoward Chu <hyc@openldap.org>
Thu, 9 Jun 2005 08:19:05 +0000 (08:19 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 9 Jun 2005 08:19:05 +0000 (08:19 +0000)
servers/slapd/daemon.c

index aafb20d75b23ec1f6d231a34c0c24fb7252177df..2797e85ecfc74dc530c1be9179c03012676d99d0 100644 (file)
@@ -1807,7 +1807,8 @@ slapd_daemon_task(
                        int     r, w;
 
                        r = SLAP_EVENT_IS_READ( i );
-                       w = SLAP_EVENT_IS_WRITE( i );
+                       /* writefds was not initialized if nwriters was zero */
+                       w = nwriters ? SLAP_EVENT_IS_WRITE( i ) : 0;
                        if ( r || w ) {
                                Debug( LDAP_DEBUG_CONNS, " %d%s%s", i,
                                    r ? "r" : "", w ? "w" : "" );