From 8f30aa29846673327fd04114d653311963782068 Mon Sep 17 00:00:00 2001 From: markster Date: Thu, 22 Apr 2004 00:20:34 +0000 Subject: gethostbyname isn't reentrant, who knew... git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2734 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_festival.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/app_festival.c') diff --git a/apps/app_festival.c b/apps/app_festival.c index fbe63cdeb..99b6226a0 100755 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -250,6 +250,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata) 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 @@ static int festival_exec(struct ast_channel *chan, void *vdata) 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; -- cgit v1.2.3