commit: r1799 - neon/trunk/src

joe at manyfish.co.uk joe at manyfish.co.uk
Fri Apr 23 05:02:28 EDT 2010


Author: joe
Date: Fri Apr 23 09:02:28 2010
New Revision: 1799

Modified:
   neon/trunk/src/ne_socket.c

Log:
* src/ne_socket.c (raw_poll): Check for execptions in select().


Modified: neon/trunk/src/ne_socket.c
==============================================================================
--- neon/trunk/src/ne_socket.c	(original)
+++ neon/trunk/src/ne_socket.c	Fri Apr 23 09:02:28 2010
@@ -392,12 +392,13 @@
         ret = poll(&fds, 1, timeout);
     } while (ret < 0 && NE_ISINTR(ne_errno));
 #else
-    fd_set rdfds, wrfds;
+    fd_set rdfds, wrfds, exfds;
     struct timeval timeout, *tvp = (secs >= 0 ? &timeout : NULL);
 
     /* Init the fd set */
     FD_ZERO(&rdfds);
     FD_ZERO(&wrfds);
+    FD_ZERO(&exfds);
 
     /* Note that (amazingly) the FD_SET macro does not expand
      * correctly on Netware if not inside a compound statement
@@ -407,13 +408,14 @@
     } else {
         FD_SET(fdno, &wrfds);
     }
+    FD_SET(fdno, &exfds);
 
     if (tvp) {
         tvp->tv_sec = secs;
         tvp->tv_usec = 0;
     }
     do {
-	ret = select(fdno + 1, &rdfds, &wrfds, NULL, tvp);
+	ret = select(fdno + 1, &rdfds, &wrfds, &exfds, tvp);
     } while (ret < 0 && NE_ISINTR(ne_errno));
 #endif
     return ret;



More information about the neon-commits mailing list