ws2_32: Add more traces.

This commit is contained in:
Dmitry Timoshkov 2013-12-11 17:02:42 +09:00 committed by Alexandre Julliard
parent e25853c543
commit 7fd3d9d499
2 changed files with 18 additions and 3 deletions

View File

@ -2944,6 +2944,7 @@ int WINAPI WS_getsockname(SOCKET s, struct WS_sockaddr *name, int *namelen)
else
{
res=0;
TRACE("=> %s\n", debugstr_sockaddr(name));
}
release_sock_fd( s, fd );
}
@ -5455,7 +5456,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr
*xai = NULL;
while (xuai) {
struct WS_addrinfo *ai = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY, sizeof(struct WS_addrinfo));
int len;
SIZE_T len;
if (!ai)
goto outofmem;
@ -5493,6 +5494,18 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr
xuai = xuai->ai_next;
}
freeaddrinfo(unixaires);
if (TRACE_ON(winsock))
{
struct WS_addrinfo *ai = *res;
while (ai)
{
TRACE("=> %p, flags %#x, family %d, type %d, protocol %d, len %ld, name %s, addr %s\n",
ai, ai->ai_flags, ai->ai_family, ai->ai_socktype, ai->ai_protocol, ai->ai_addrlen,
ai->ai_canonname, debugstr_sockaddr(ai->ai_addr));
ai = ai->ai_next;
}
}
} else
result = convert_eai_u2w(result);
@ -6985,6 +6998,7 @@ INT WINAPI WSAAddressToStringA( LPSOCKADDR sockaddr, DWORD len,
return SOCKET_ERROR;
}
TRACE("=> %s,%u bytes\n", debugstr_a(buffer), size);
*lenstr = size;
strcpy( string, buffer );
return 0;
@ -7034,6 +7048,7 @@ INT WINAPI WSAAddressToStringW( LPSOCKADDR sockaddr, DWORD len,
return SOCKET_ERROR;
}
TRACE("=> %s,%u bytes\n", debugstr_w(buffer), size);
*lenstr = size;
lstrcpyW( string, buffer );
return 0;

View File

@ -36,7 +36,7 @@ typedef struct WS(addrinfo)
int ai_family;
int ai_socktype;
int ai_protocol;
size_t ai_addrlen;
SIZE_T ai_addrlen;
char * ai_canonname;
struct WS(sockaddr)* ai_addr;
struct WS(addrinfo)* ai_next;
@ -48,7 +48,7 @@ typedef struct WS(addrinfoW)
int ai_family;
int ai_socktype;
int ai_protocol;
size_t ai_addrlen;
SIZE_T ai_addrlen;
PWSTR ai_canonname;
struct WS(sockaddr)* ai_addr;
struct WS(addrinfoW)* ai_next;