You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mt...@apache.org on 2006/08/03 10:24:46 UTC
svn commit: r428278 - /httpd/httpd/trunk/os/win32/util_win32.c
Author: mturk
Date: Thu Aug 3 01:24:44 2006
New Revision: 428278
URL: http://svn.apache.org/viewvc?rev=428278&view=rev
Log:
Do not return on WAIT_ABANDONED signals.
It means that we got the ownership, not that the
object was signaled.
Modified:
httpd/httpd/trunk/os/win32/util_win32.c
Modified: httpd/httpd/trunk/os/win32/util_win32.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/os/win32/util_win32.c?rev=428278&r1=428277&r2=428278&view=diff
==============================================================================
--- httpd/httpd/trunk/os/win32/util_win32.c (original)
+++ httpd/httpd/trunk/os/win32/util_win32.c Thu Aug 3 01:24:44 2006
@@ -157,12 +157,12 @@
DWORD wait_for_many_objects(DWORD nCount, CONST HANDLE *lpHandles,
DWORD dwSeconds)
{
- time_t tStopTime;
+ DWORD dwStopTime;
DWORD dwRet = WAIT_FAILED;
- DWORD dwIndex=0;
+ DWORD dwIndex = 0;
BOOL bFirst = TRUE;
- tStopTime = time(NULL) + dwSeconds;
+ dwStopTime = GetTickCount() + dwSeconds * 1000;
do {
if (!bFirst)
@@ -179,16 +179,19 @@
return dwRet;
}
if (dwRet != WAIT_TIMEOUT) {
- if (dwRet >= WAIT_ABANDONED_0)
- dwRet = dwRet - WAIT_ABANDONED_0;
- else
- dwRet = dwRet - WAIT_OBJECT_0;
- dwRet = dwRet + (dwIndex * MAXIMUM_WAIT_OBJECTS);
- break;
+ if (dwRet >= WAIT_ABANDONED_0) {
+ /* We just got the ownership of the object.
+ * It does not mean that the object is signaled.
+ */
+ }
+ else {
+ dwRet = dwRet - WAIT_OBJECT_0 + (dwIndex * MAXIMUM_WAIT_OBJECTS);
+ break;
+ }
}
dwRet = WAIT_FAILED;
}
- } while((time(NULL) < tStopTime) && (dwRet == WAIT_FAILED));
+ } while((GetTickCount() < dwStopTime) && (dwRet == WAIT_FAILED));
return dwRet;
}