From 2e5e32c5749cb251e199889835c04b3c7440b876 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Tue, 31 Oct 2006 06:21:40 +0000 Subject: [PATCH] Merged revisions 46561 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r46561 | russell | 2006-10-31 01:19:56 -0500 (Tue, 31 Oct 2006) | 11 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@46562 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main/utils.c b/main/utils.c index 2914b80130..5c08f13729 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)