summaryrefslogtreecommitdiff
path: root/apps/app_festival.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-04-22 00:20:34 +0000
committerMark Spencer <markster@digium.com>2004-04-22 00:20:34 +0000
commitd3f9887589e9d48753ac83d3b94e82c50c6bd446 (patch)
treedbaf6442bfe038629c0c97eef75077d71ebd2ec7 /apps/app_festival.c
parentca493a14e169c6047e0ca2d1fc5447dfc3f5aa4c (diff)
gethostbyname isn't reentrant, who knew...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_festival.c')
-rwxr-xr-xapps/app_festival.c3
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;