]> git.sur5r.net Git - openldap/commitdiff
On Windows, WSAENOTSOCK is treated the same as EBADF. This is needed because of...
authorMark Valence <mrv@openldap.org>
Thu, 9 Dec 1999 22:05:00 +0000 (22:05 +0000)
committerMark Valence <mrv@openldap.org>
Thu, 9 Dec 1999 22:05:00 +0000 (22:05 +0000)
servers/slapd/daemon.c

index 823e6bd0b31aa93f8947431b90b5c68ec078fb82..f49a339689388743fb77395af97eda80e7ec4fe0 100644 (file)
@@ -569,8 +569,13 @@ slapd_daemon_task(
                case -1: {      /* failure - try again */
                                int err = sock_errno();
 
-                               if( err == EBADF && ++ebadf < SLAPD_EBADF_LIMIT) {
-                                       continue;
+                               if( err == EBADF 
+#ifdef HAVE_WINSOCK
+                                       || err == WSAENOTSOCK   /* you'd think this would be EBADF */
+#endif
+                               ) {
+                                       if (++ebadf < SLAPD_EBADF_LIMIT)
+                                               continue;
                                }
 
                                if( err != EINTR ) {