diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-08-14 01:28:47 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-08-14 01:28:47 +0000 |
commit | df4a264f6a4bf53592f9e273462a8861ea7e6a6d (patch) | |
tree | 7fc180164f8bc204cea413b098a9068dbdc2c792 /checkalias.c | |
parent | c625d7a00b024fe5de26d16b6420abebb1db705c (diff) | |
download | fetchmail-df4a264f6a4bf53592f9e273462a8861ea7e6a6d.tar.gz fetchmail-df4a264f6a4bf53592f9e273462a8861ea7e6a6d.tar.bz2 fetchmail-df4a264f6a4bf53592f9e273462a8861ea7e6a6d.zip |
Wrap getaddrinfo() and block SIGALRM where needed.
Also wrap freeaddrinfo() without added functionality.
svn path=/branches/BRANCH_6-3/; revision=4895
Diffstat (limited to 'checkalias.c')
-rw-r--r-- | checkalias.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) |