commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1139250 - in /commons/sandbox/runtime/trunk/src/main/native/os: linux/epoll.c unix/pollset.c
Date Fri, 24 Jun 2011 11:30:55 GMT
Author: mturk
Date: Fri Jun 24 11:30:55 2011
New Revision: 1139250

URL: http://svn.apache.org/viewvc?rev=1139250&view=rev
Log:
Fix TTL compare

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/pollset.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c?rev=1139250&r1=1139249&r2=1139250&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/linux/epoll.c Fri Jun 24 11:30:55 2011
@@ -555,7 +555,7 @@ ACR_NET_EXPORT(jint, LinuxSelector, wait
         if (pe->pfd.ttl > 0) {
             if (now == 0)
                 now = AcrTimeNow();
-            if (pe->pfd.exp > now) {
+            if (now > pe->pfd.exp) {
                 /* Expired descriptor */
                 pevents[rv] = ACR_OP_TIMEOUT;
                 (*env)->SetObjectArrayElement(env, rs, rv++, pe->pfd.obj);

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/pollset.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/pollset.c?rev=1139250&r1=1139249&r2=1139250&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/pollset.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/pollset.c Fri Jun 24 11:30:55 2011
@@ -356,7 +356,7 @@ ACR_NET_EXPORT(jint, PollSelector, wait0
             if (ps->ooset[i].ttl > 0) {
                 if (now == 0)
                     now = AcrTimeNow();                
-                if (ps->ooset[i].exp > now) {
+                if (now > ps->ooset[i].exp) {
                     /* Expired descriptor */
                     ps->fdset[i].revents = POLLHUP;
                     pevents[rv] = ACR_OP_TIMEOUT;



Mime
View raw message