OSSP CVS Repository

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

ossp-pkg/pth/pth_high.c 1.94 -> 1.95

--- pth_high.c   2002/10/25 11:59:18     1.94
+++ pth_high.c   2002/11/05 19:39:09     1.95
@@ -172,7 +172,7 @@
     pth_wait(ev);
     if (ev_extra != NULL) {
         pth_event_isolate(ev);
-        if (!pth_event_occurred(ev))
+        if (pth_event_status(ev) != PTH_STATUS_OCCURRED)
             return pth_error(EINTR, EINTR);
     }
 
@@ -326,7 +326,7 @@
             pth_wait(ev);
             if (ev_extra != NULL) {
                 pth_event_isolate(ev);
-                if (!pth_event_occurred(ev))
+                if (pth_event_status(ev) != PTH_STATUS_OCCURRED)
                     return pth_error(-1, EINTR);
             }
         }
@@ -396,11 +396,11 @@
     pth_wait(ev);
     selected = FALSE;
     pth_event_isolate(ev_select);
-    if (pth_event_occurred(ev_select))
+    if (pth_event_status(ev_select) == PTH_STATUS_OCCURRED)
         selected = TRUE;
     if (timeout != NULL) {
         pth_event_isolate(ev_timeout);
-        if (pth_event_occurred(ev_timeout)) {
+        if (pth_event_status(ev_timeout) == PTH_STATUS_OCCURRED) {
             selected = TRUE;
             /* POSIX compliance */
             if (rfds != NULL) FD_ZERO(rfds);
@@ -409,6 +409,8 @@
             rc = 0;
         }
     }
+    if (pth_event_status(ev_select) == PTH_STATUS_FAILED)
+        return pth_error(-1, EBADF);
     if (ev_extra != NULL && !selected)
         return pth_error(-1, EINTR);
     return rc;
@@ -608,7 +610,7 @@
         pth_wait(ev);
         if (ev_extra != NULL) {
             pth_event_isolate(ev);
-            if (!pth_event_occurred(ev))
+            if (pth_event_status(ev) != PTH_STATUS_OCCURRED)
                 return pth_error(-1, EINTR);
         }
         errlen = sizeof(err);
@@ -663,7 +665,7 @@
         /* check for the extra events */
         if (ev_extra != NULL) {
             pth_event_isolate(ev);
-            if (!pth_event_occurred(ev)) {
+            if (pth_event_status(ev) != PTH_STATUS_OCCURRED) {
                 pth_fdmode(s, fdmode);
                 return pth_error(-1, EINTR);
             }
@@ -727,7 +729,7 @@
             n = pth_wait(ev);
             if (ev_extra != NULL) {
                 pth_event_isolate(ev);
-                if (!pth_event_occurred(ev))
+                if (pth_event_status(ev) != PTH_STATUS_OCCURRED)
                     return pth_error(-1, EINTR);
             }
         }
@@ -799,7 +801,7 @@
                 pth_wait(ev);
                 if (ev_extra != NULL) {
                     pth_event_isolate(ev);
-                    if (!pth_event_occurred(ev)) {
+                    if (pth_event_status(ev) != PTH_STATUS_OCCURRED) {
                         pth_fdmode(fd, fdmode);
                         return pth_error(-1, EINTR);
                     }
@@ -889,7 +891,7 @@
             n = pth_wait(ev);
             if (ev_extra != NULL) {
                 pth_event_isolate(ev);
-                if (!pth_event_occurred(ev))
+                if (pth_event_status(ev) != PTH_STATUS_OCCURRED)
                     return pth_error(-1, EINTR);
             }
         }
@@ -1034,7 +1036,7 @@
                 pth_wait(ev);
                 if (ev_extra != NULL) {
                     pth_event_isolate(ev);
-                    if (!pth_event_occurred(ev)) {
+                    if (pth_event_status(ev) != PTH_STATUS_OCCURRED) {
                         pth_fdmode(fd, fdmode);
                         if (iovcnt > sizeof(tiov_stack))
                             free(tiov);
@@ -1314,7 +1316,7 @@
             n = pth_wait(ev);
             if (ev_extra != NULL) {
                 pth_event_isolate(ev);
-                if (!pth_event_occurred(ev))
+                if (pth_event_status(ev) != PTH_STATUS_OCCURRED)
                     return pth_error(-1, EINTR);
             }
         }
@@ -1402,7 +1404,7 @@
                 pth_wait(ev);
                 if (ev_extra != NULL) {
                     pth_event_isolate(ev);
-                    if (!pth_event_occurred(ev)) {
+                    if (pth_event_status(ev) != PTH_STATUS_OCCURRED) {
                         pth_fdmode(fd, fdmode);
                         return pth_error(-1, EINTR);
                     }

CVSTrac 2.0.1