From: Heikki Lindholm Date: Mon, 26 Oct 2009 21:03:03 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~23221 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f29194cd952c10f655e175b056ce813d11fce1f2;p=oweals%2Fgnunet.git fix --- diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index dbf57e85a..284a3cef6 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c @@ -273,7 +273,7 @@ GNUNET_RESOLVER_ip_get (struct GNUNET_SCHEDULER_Handle *sched, #endif /* first, check if this is a numeric address */ if ( ( (domain == AF_UNSPEC) || (domain == AF_INET) ) && - (0 == inet_pton (AF_INET, + (1 == inet_pton (AF_INET, hostname, &v4.sin_addr)) ) { @@ -281,7 +281,7 @@ GNUNET_RESOLVER_ip_get (struct GNUNET_SCHEDULER_Handle *sched, (const struct sockaddr*) &v4, sizeof(v4)); if ( (domain == AF_UNSPEC) && - (0 == inet_pton (AF_INET6, + (1 == inet_pton (AF_INET6, hostname, &v6.sin6_addr)) ) { @@ -293,8 +293,8 @@ GNUNET_RESOLVER_ip_get (struct GNUNET_SCHEDULER_Handle *sched, callback (callback_cls, NULL, 0); return; } - if ( ( (domain == AF_UNSPEC) ||(domain == AF_INET) ) && - (0 == inet_pton (AF_INET6, + if ( ( (domain == AF_UNSPEC) || (domain == AF_INET6) ) && + (1 == inet_pton (AF_INET6, hostname, &v6.sin6_addr)) ) {