diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-22 00:20:34 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-22 00:20:34 +0000 |
commit | 8f30aa29846673327fd04114d653311963782068 (patch) | |
tree | dbaf6442bfe038629c0c97eef75077d71ebd2ec7 /apps/app_festival.c | |
parent | a4f2d9262e216fe8e8607f8d8d07c08ec87c0149 (diff) |
gethostbyname isn't reentrant, who knew...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2734 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_festival.c')
-rwxr-xr-x | apps/app_festival.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |