aboutsummaryrefslogtreecommitdiffstats
path: root/main/utils.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-31 06:19:56 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-31 06:19:56 +0000
commitda98a0ffe543832dbb188abbb4ca93d85d4fac2a (patch)
treecff04ad81b453c743c59ea3826049d644ca59dd7 /main/utils.c
parent14c8986eb8d7845a4e747d882d0da60959391e00 (diff)
Merged revisions 46560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r46560 | russell | 2006-10-31 01:18:36 -0500 (Tue, 31 Oct 2006) | 3 lines When handling the case where the hostname is just an IPV4 numeric address, be sure to set the address type. (issue #8247, alexr) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@46561 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/utils.c')
-rw-r--r--main/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/main/utils.c b/main/utils.c
index 6e1b4674f..b1c154131 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -204,6 +204,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
if (dots != 3)
return NULL;
memset(hp, 0, sizeof(struct ast_hostent));
+ hp->hp.h_addrtype = AF_INET;
hp->hp.h_addr_list = (void *) hp->buf;
hp->hp.h_addr = hp->buf + sizeof(void *);
if (inet_pton(AF_INET, host, hp->hp.h_addr) > 0)