OSSP CVS Repository

ossp - Difference in ossp-pkg/pth/pth_high.c versions 1.81 and 1.82
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/pth/pth_high.c 1.81 -> 1.82

--- pth_high.c   2002/01/27 11:03:40     1.81
+++ pth_high.c   2002/01/27 12:39:10     1.82
@@ -496,7 +496,7 @@
     errno_shield { pth_fdmode(s, fdmode); }
 
     /* if it is still on progress wait until socket is really writeable */
-    if (rv == -1 && errno == EINPROGRESS) {
+    if (rv == -1 && errno == EINPROGRESS && fdmode != PTH_FDMODE_NONBLOCK) {
         ev = pth_event(PTH_EVENT_FD|PTH_UNTIL_FD_WRITEABLE|PTH_MODE_STATIC, &ev_key, s);
         if (ev_extra != NULL)
             pth_event_concat(ev, ev_extra, NULL);
@@ -541,7 +541,8 @@
     /* poll socket via accept */
     ev = NULL;
     while ((rv = pth_sc(accept)(s, addr, addrlen)) == -1
-           && (errno == EAGAIN || errno == EWOULDBLOCK)) {
+           && (errno == EAGAIN || errno == EWOULDBLOCK)
+           && fdmode != PTH_FDMODE_NONBLOCK) {
         /* do lazy event allocation */
         if (ev == NULL) {
             ev = pth_event(PTH_EVENT_FD|PTH_UNTIL_FD_READABLE|PTH_MODE_STATIC, &ev_key, s);

CVSTrac 2.0.1