From: Bill Stoddard Date: Tue, 20 Nov 2001 21:34:18 +0000 (+0000) Subject: Win32: Move the call to fetch the network addresses into the accept loop X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30f7892466eb8451d7a288d3630dcf01b444aae9;p=apache Win32: Move the call to fetch the network addresses into the accept loop and out of the worker threads. This makes it a bit easier to implement accept loop processing in modules outside the MPM. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92058 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index c5973ad7ed..3552852c39 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -781,13 +781,23 @@ static void winnt_accept(void *listen_socket) "setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed."); /* Not a failure condition. Keep running. */ } + + /* Get the local & remote address */ + GetAcceptExSockaddrs(pCompContext->buff, + 0, + PADDED_ADDR_SIZE, + PADDED_ADDR_SIZE, + &pCompContext->sa_server, + &pCompContext->sa_server_len, + &pCompContext->sa_client, + &pCompContext->sa_client_len); + /* When a connection is received, send an io completion notification to * the ThreadDispatchIOCP. This function could be replaced by * mpm_post_completion_context(), but why do an extra function call... */ PostQueuedCompletionStatus(ThreadDispatchIOCP, 0, IOCP_CONNECTION_ACCEPTED, &pCompContext->Overlapped); - } if (!shutdown_in_progress) { @@ -840,18 +850,7 @@ static PCOMP_CONTEXT winnt_get_connection(PCOMP_CONTEXT pCompContext) "Child %d: apr_pool_create failed with rc %d", my_pid, rc); } - /* Get the local & remote address */ - GetAcceptExSockaddrs(pCompContext->buff, - 0, - PADDED_ADDR_SIZE, - PADDED_ADDR_SIZE, - &pCompContext->sa_server, - &pCompContext->sa_server_len, - &pCompContext->sa_client, - &pCompContext->sa_client_len); - return pCompContext; - } /*