Dmitry Timoshkov : ws2_32: Add more traces.
Alexandre Julliard
julliard at winehq.org
Thu Dec 26 12:23:33 CST 2013
Module: wine
Branch: master
Commit: 7fd3d9d499edf9dd3f582d9c0734d7529471b9b4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7fd3d9d499edf9dd3f582d9c0734d7529471b9b4
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Wed Dec 11 17:02:42 2013 +0900
ws2_32: Add more traces.
---
dlls/ws2_32/socket.c | 17 ++++++++++++++++-
include/ws2tcpip.h | 4 ++--
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 9fd85c5..ee64d45 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -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;
diff --git a/include/ws2tcpip.h b/include/ws2tcpip.h
index 705c5ed..89f4895 100644
--- a/include/ws2tcpip.h
+++ b/include/ws2tcpip.h
@@ -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;
More information about the wine-cvs
mailing list