diff options
author | Jeff Trawick <trawick@apache.org> | 2011-04-03 17:50:18 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2011-04-03 17:50:18 +0000 |
commit | 720810e760c45ebf15f1781c716028ec5503d016 (patch) | |
tree | 0f0633a29e403c039f10123f8e7e8ac8dab1b2ae /network_io/win32 | |
parent | 44279f6054e809b151340c00cbae6ed5cf40f606 (diff) | |
download | apr-720810e760c45ebf15f1781c716028ec5503d016.tar.gz |
Windows: Save a call to getpeername() when trying to retrieve the
remote address of a socket created by apr_socket_accept()
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1088352 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'network_io/win32')
-rw-r--r-- | network_io/win32/sockets.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/network_io/win32/sockets.c b/network_io/win32/sockets.c index 62f61fe4a..081e77c62 100644 --- a/network_io/win32/sockets.c +++ b/network_io/win32/sockets.c @@ -252,6 +252,8 @@ APR_DECLARE(apr_status_t) apr_socket_accept(apr_socket_t **new, /* XXX next line looks bogus w.r.t. AF_INET6 support */ (*new)->remote_addr->salen = sizeof((*new)->remote_addr->sa); memcpy (&(*new)->remote_addr->sa, &sa, salen); + (*new)->remote_addr_unknown = 0; + *(*new)->local_addr = *sock->local_addr; /* The above assignment just overwrote the pool entry. Setting the local_addr |