[Asterisk-cvs] asterisk asterisk.c,1.51.2.16,1.51.2.17

markster at lists.digium.com markster at lists.digium.com
Sun May 9 10:39:56 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv9729

Modified Files:
      Tag: v1-0_stable
	asterisk.c 
Log Message:
Backport gethostbyname fix from cvs head (bug #1590)


Index: asterisk.c
===================================================================
RCS file: /usr/cvsroot/asterisk/asterisk.c,v
retrieving revision 1.51.2.16
retrieving revision 1.51.2.17
diff -u -d -r1.51.2.16 -r1.51.2.17
--- asterisk.c	28 Apr 2004 13:53:31 -0000	1.51.2.16
+++ asterisk.c	9 May 2004 14:49:35 -0000	1.51.2.17
@@ -1679,7 +1679,7 @@
 
 	res = gethostbyname_r(host, &hp->hp, hp->buf, sizeof(hp->buf), &result, &herrno);
 
-	if (res)
+	if (res || !hp->hp.h_addr_list || !hp->hp.h_addr_list[0])
 		return NULL;
 	return &hp->hp;
 }




More information about the svn-commits mailing list