summaryrefslogtreecommitdiff
path: root/src/tcp.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2010-12-02 00:28:25 +0000
committerChristian Pointner <equinox@spreadspace.org>2010-12-02 00:28:25 +0000
commit90f403d1f554822be06564ea52498d710d2bf051 (patch)
treed7642107854c778f952bd2876578c627e744eb9e /src/tcp.c
parentbuffer size can now be configured (diff)
added new options for resolv types (IPv4 vs IPv6)
manpage: new parameters manpage: added short description to each parameter git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@19 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
Diffstat (limited to 'src/tcp.c')
-rw-r--r--src/tcp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tcp.c b/src/tcp.c
index ea2af7d..fa69ba2 100644
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -75,7 +75,10 @@ struct addrinfo* tcp_resolve_endpoint(const char* addr, const char* port, resolv
int errcode = getaddrinfo(addr, port, &hints, &res);
if (errcode != 0) {
- log_printf(ERROR, "Error resolving address (%s:%s): %s", (addr) ? addr : "*", (port) ? port : "0", gai_strerror(errcode));
+ char* type = "";
+ if(rt == IPV4_ONLY) type = "IPv4 ";
+ else if(rt == IPV6_ONLY) type = "IPv6 ";
+ log_printf(ERROR, "Error resolving %saddress (%s:%s): %s", type, (addr) ? addr : "*", (port) ? port : "0", gai_strerror(errcode));
return NULL;
}
if(!res) {