Skip to content
Snippets Groups Projects
Commit 7254cca9 authored by Mark Spencer's avatar Mark Spencer
Browse files

Really fix ast_gethostbyname

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2963 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 50b637d1
No related branches found
No related tags found
No related merge requests found
......@@ -137,7 +137,7 @@ struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp)
return NULL;
res = gethostbyname_r(host, &hp->hp, hp->buf, sizeof(hp->buf), &result, &herrno);
if (res || !hp->hp.h_addr_list || !hp->hp.h_addr_list[0])
if (res || !result || !hp->hp.h_addr_list || !hp->hp.h_addr_list[0])
return NULL;
return &hp->hp;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment