From df4a264f6a4bf53592f9e273462a8861ea7e6a6d Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Mon, 14 Aug 2006 01:28:47 +0000 Subject: Wrap getaddrinfo() and block SIGALRM where needed. Also wrap freeaddrinfo() without added functionality. svn path=/branches/BRANCH_6-3/; revision=4895 --- checkalias.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'checkalias.c') diff --git a/checkalias.c b/checkalias.c index 1f0495b9..80356ed2 100644 --- a/checkalias.c +++ b/checkalias.c @@ -36,7 +36,7 @@ static int getaddresses(struct addrinfo **result, const char *name) hints.ai_socktype=SOCK_STREAM; hints.ai_protocol=PF_UNSPEC; hints.ai_family=AF_UNSPEC; - return getaddrinfo(name, NULL, &hints, result); + return fm_getaddrinfo(name, NULL, &hints, result); } /* XXX FIXME: doesn't detect if an IPv6-mapped IPv4 address @@ -77,9 +77,9 @@ static int is_ip_alias(const char *name1,const char *name2) found: if (res2) - freeaddrinfo(res2); + fm_freeaddrinfo(res2); if (res1) - freeaddrinfo(res1); + fm_freeaddrinfo(res1); return rc; } @@ -160,16 +160,16 @@ int is_host_alias(const char *name, struct query *ctl, struct addrinfo **res) hints.ai_socktype=SOCK_STREAM; hints.ai_flags=AI_CANONNAME; - e = getaddrinfo(name, NULL, &hints, res); + e = fm_getaddrinfo(name, NULL, &hints, res); if (e == 0) { int rr = (strcasecmp(ctl->server.truename, (*res)->ai_canonname) == 0); - freeaddrinfo(*res); *res = NULL; + fm_freeaddrinfo(*res); *res = NULL; if (rr) goto match; - else if (ctl->server.checkalias && 0 == getaddrinfo(ctl->server.truename, NULL, &hints, &res_st)) + else if (ctl->server.checkalias && 0 == fm_getaddrinfo(ctl->server.truename, NULL, &hints, &res_st)) { - freeaddrinfo(res_st); + fm_freeaddrinfo(res_st); if (outlevel >= O_DEBUG) report(stdout, GT_("Checking if %s is really the same node as %s\n"),ctl->server.truename,name); if (is_ip_alias(ctl->server.truename,name) == TRUE) -- cgit v1.2.3