diff options
Diffstat (limited to 'asterisk.c')
-rwxr-xr-x | asterisk.c | 2 |
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; } |