projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50b637d
)
Really fix ast_gethostbyname
author
Mark Spencer
<markster@digium.com>
Thu, 13 May 2004 21:54:30 +0000
(21:54 +0000)
committer
Mark Spencer
<markster@digium.com>
Thu, 13 May 2004 21:54:30 +0000
(21:54 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2963
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
utils.c
patch
|
blob
|
history
diff --git
a/utils.c
b/utils.c
index
1ecbc21
..
ebe2b37
100755
(executable)
--- a/
utils.c
+++ b/
utils.c
@@
-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;
}