diff options
author | Yang Tse <yangsita@gmail.com> | 2009-05-14 19:52:19 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-05-14 19:52:19 +0000 |
commit | 6595592a710a7ac7c5dadffd92b1f0618969be0b (patch) | |
tree | 34b08408dce6d829d87b8ca8d4b700b170d2fda4 | |
parent | 199389c94a3dd7099e081ecb68d464d22451b34d (diff) |
Add some debug tracing
-rw-r--r-- | tests/server/sockfilt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 65f8fe437..fdef15edf 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -765,11 +765,13 @@ static curl_socket_t sockdaemon(curl_socket_t sock, #endif la_size = sizeof(localaddr4); localaddr = (struct sockaddr *)&localaddr4; + logmsg("debug: IPv4 la_size = %zu\n", (size_t)la_size); #ifdef ENABLE_IPV6 } else { la_size = sizeof(localaddr6); localaddr = (struct sockaddr *)&localaddr6; + logmsg("debug: IPv6 la_size = %zu\n", (size_t)la_size); } #endif memset(localaddr, 0, (size_t)la_size); @@ -780,16 +782,20 @@ static curl_socket_t sockdaemon(curl_socket_t sock, sclose(sock); return CURL_SOCKET_BAD; } + logmsg("debug: localaddr->sa_family = %d\n", (int)localaddr->sa_family); switch (localaddr->sa_family) { case AF_INET: + logmsg("debug: AF_INET localaddr4.sin_port = %hu\n", localaddr4.sin_port); *listenport = ntohs(localaddr4.sin_port); break; #ifdef ENABLE_IPV6 case AF_INET6: + logmsg("debug: AF_INET6 localaddr6.sin6_port = %hu\n", localaddr6.sin6_port); *listenport = ntohs(localaddr6.sin6_port); break; #endif default: + logmsg("debug: AF_UNKNOWN\n"); break; } if(!*listenport) { |