]> granicus.if.org Git - php/commitdiff
Fixed bug #65268 select() implementation uses outdated tick API
authorAnatol Belski <ab@php.net>
Thu, 18 Jul 2013 16:01:51 +0000 (18:01 +0200)
committerAnatol Belski <ab@php.net>
Thu, 18 Jul 2013 16:01:51 +0000 (18:01 +0200)
NEWS
win32/select.c

diff --git a/NEWS b/NEWS
index 81cac3b8e66b1ea0bd1fac516536880d01678c47..6f4479ccd510a0f936889c6912a88db0818fbd8d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2013, PHP 5.5.2
 
+- Streams:
+  . Fixed bug #65268 (select() implementation uses outdated tick API). (Anatol)
+
 18 Jul 2013, PHP 5.5.1
 
 - Core:
index d77ef3de00e10e8439adee701431245fb52e450e..92af4be7b818f1499823c2132e904b610e483a6b 100644 (file)
@@ -36,7 +36,7 @@
  * */
 PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *tv)
 {
-       DWORD ms_total, limit;
+       ULONGLONG ms_total, limit;
        HANDLE handles[MAXIMUM_WAIT_OBJECTS];
        int handle_slot_to_fd[MAXIMUM_WAIT_OBJECTS];
        int n_handles = 0, i;
@@ -97,7 +97,7 @@ PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, stru
        FD_ZERO(&awrite);
        FD_ZERO(&aexcept);
        
-       limit = GetTickCount() + ms_total;
+       limit = GetTickCount64() + ms_total;
        do {
                retcode = 0;
        
@@ -149,7 +149,7 @@ PHPAPI int php_select(int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, stru
                                }
                        }
                }
-       } while (retcode == 0 && (ms_total == INFINITE || GetTickCount() < limit));
+       } while (retcode == 0 && (ms_total == INFINITE || GetTickCount64() < limit));
 
        if (rfds) {
                *rfds = aread;