[Asterisk-cvs] asterisk/apps app_festival.c,1.18,1.19

markster at lists.digium.com markster at lists.digium.com
Wed Apr 21 20:15:52 CDT 2004


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

Modified Files:
	app_festival.c 
Log Message:
gethostbyname isn't reentrant, who knew...


Index: app_festival.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_festival.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- app_festival.c	16 Apr 2004 02:51:47 -0000	1.18
+++ app_festival.c	22 Apr 2004 00:20:33 -0000	1.19
@@ -250,6 +250,7 @@
 	struct localuser *u;
  	struct sockaddr_in serv_addr;
 	struct hostent *serverhost;
+	struct ast_hostent ahp;
 	int fd;
 	FILE *fs;
 	char *host;
@@ -330,7 +331,7 @@
         memset(&serv_addr, 0, sizeof(serv_addr));
         if ((serv_addr.sin_addr.s_addr = inet_addr(host)) == -1) {
 	        /* its a name rather than an ipnum */
-	        serverhost = gethostbyname(host);
+	        serverhost = ast_gethostbyname(host, &ahp);
 	        if (serverhost == (struct hostent *)0) {
         	    	ast_log(LOG_WARNING,"festival_client: gethostbyname failed\n");
 	            	return -1;




More information about the svn-commits mailing list