aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-07 20:18:55 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-05-07 20:18:55 +0000
commite090e8c65cb14bc5fd1a5b2e5a33a646c4280d6c (patch)
treee0346a750904a877e4bebda782a6d8af427c2867 /asterisk.c
parent329217f4aa4092d36ff8980a335391dac082af4d (diff)
Check h_addr_list, too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2917 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rwxr-xr-xasterisk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c
index 9106a5621..3edefd223 100755
--- a/asterisk.c
+++ b/asterisk.c
@@ -1851,7 +1851,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
res = gethostbyname_r(host, &hp->hp, hp->buf, sizeof(hp->buf), &result, &herrno);
- if (res || !hp->hp.h_addr)
+ if (res || !hp->hp.h_addr_list || !hp->hp.h_addr_list[0])
return NULL;
return &hp->hp;
}