Fix for broken logging of IP client address in some cases.

This commit is contained in:
Breno Silva
2012-11-13 15:54:23 -04:00
parent 91e5f85cc1
commit bfdb28e2ab
3 changed files with 9 additions and 4 deletions

View File

@@ -87,6 +87,11 @@ char *GetIpAddr(apr_pool_t *pool, PSOCKADDR pAddr)
DWORD len = 50;
char *buf = (char *)apr_palloc(pool, len);
if(buf == NULL)
return "";
buf[0] = 0;
WSAAddressToString(pAddr, sizeof(SOCKADDR), NULL, buf, &len);
return buf;