diff options
author | Michael Adam <obnox@samba.org> | 2013-11-16 03:03:43 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-11-16 11:30:07 +0100 |
commit | 836d4534d657361a67861630e1aa9888dbe95030 (patch) | |
tree | 60778b0a165d21abff6d42d38beacf9918f89e69 | |
parent | e82080a5f62991e2892b88dce108537f64960e55 (diff) | |
download | tinyproxy-836d4534d657361a67861630e1aa9888dbe95030.tar.gz tinyproxy-836d4534d657361a67861630e1aa9888dbe95030.zip |
sock: add debug messages to opensock()
log entering opensock and successful return of getaddrinfo.
This allows to detect dns timeouts from looking at the logs.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to '')
-rw-r--r-- | src/sock.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -84,6 +84,9 @@ int opensock (const char *host, int port, const char *bind_to) assert (host != NULL); assert (port > 0); + log_message(LOG_INFO, + "opensock: opening connection to %s:%d", host, port); + memset (&hints, 0, sizeof (struct addrinfo)); hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; @@ -97,6 +100,9 @@ int opensock (const char *host, int port, const char *bind_to) return -1; } + log_message(LOG_INFO, + "opensock: getaddrinfo returned for %s:%d", host, port); + ressave = res; do { sockfd = |