summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2013-07-18 18:01:51 +0200
committerAnatol Belski <ab@php.net>2013-07-18 18:01:51 +0200
commit99afc6dc11016be47ce2ba09779ae4a34d435f5b (patch)
treebdab34f21ef0b9dcc44409a2fc3a6219f0172cf6
parentd8dd4d9b026b82d11c3623891b5114af76054e59 (diff)
downloadphp-git-99afc6dc11016be47ce2ba09779ae4a34d435f5b.tar.gz
Fixed bug #65268 select() implementation uses outdated tick API
-rw-r--r--NEWS3
-rw-r--r--win32/select.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 81cac3b8e6..6f4479ccd5 100644
--- 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:
diff --git a/win32/select.c b/win32/select.c
index d77ef3de00..92af4be7b8 100644
--- a/win32/select.c
+++ b/win32/select.c
@@ -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;