From: William A. Rowe Jr Date: Sun, 4 Aug 2002 18:47:34 +0000 (+0000) Subject: INVALID_SOCKET is -1 and appropriate to test throughout. X-Git-Tag: 2.0.40~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8070dd1503c60f7b62e012c119249edf870ae952;p=apache INVALID_SOCKET is -1 and appropriate to test throughout. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96308 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 6d343d74c3..2be74259f8 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -306,7 +306,7 @@ static int remove_job(void) if (shutdown_in_progress && !allowed_globals.jobhead) { apr_thread_mutex_unlock(allowed_globals.jobmutex); - return (-1); + return (INVALID_SOCKET); } job = allowed_globals.jobhead; ap_assert(job); @@ -425,7 +425,7 @@ static PCOMP_CONTEXT win9x_get_connection(PCOMP_CONTEXT context) while (1) { apr_pool_clear(context->ptrans); context->accept_socket = remove_job(); - if (context->accept_socket == -1) { + if (context->accept_socket == INVALID_SOCKET) { return NULL; } len = sizeof(struct sockaddr); @@ -543,7 +543,7 @@ static void winnt_accept(void *lr_) while (1) { rv = WaitForSingleObject(context->Overlapped.hEvent, 1000); if (rv == WAIT_OBJECT_0) { - if (context->accept_socket == -1) { + if (context->accept_socket == INVALID_SOCKET) { /* socket already closed */ break; } @@ -963,7 +963,7 @@ void child_main(apr_pool_t *pconf) /* Shutdown the worker threads */ if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { for (i = 0; i < threads_created; i++) { - add_job(-1); + add_job(INVALID_SOCKET); } } else { /* Windows NT/2000 */