diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-16 14:39:29 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-16 14:39:29 +0000 |
commit | d17ff1ea42571817d74962062410ca54a06b2053 (patch) | |
tree | 1236d574745c7d4d49bb3fb658e3a6bdd3e88a22 /apps/app_festival.c | |
parent | 9e24ed5ccff762fa9d412d1a1321df2de1b26423 (diff) |
Applications no longer need to call ast_module_user_add and ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_festival.c')
-rw-r--r-- | apps/app_festival.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/apps/app_festival.c b/apps/app_festival.c index d43c3aa16..058477054 100644 --- a/apps/app_festival.c +++ b/apps/app_festival.c @@ -284,7 +284,6 @@ static int festival_exec(struct ast_channel *chan, void *vdata) { int usecache; int res=0; - struct ast_module_user *u; struct sockaddr_in serv_addr; struct hostent *serverhost; struct ast_hostent ahp; @@ -323,12 +322,9 @@ static int festival_exec(struct ast_channel *chan, void *vdata) return -1; } - u = ast_module_user_add(chan); - cfg = ast_config_load(FESTIVAL_CONFIG); if (!cfg) { ast_log(LOG_WARNING, "No such configuration file %s\n", FESTIVAL_CONFIG); - ast_module_user_remove(u); return -1; } if (!(host = ast_variable_retrieve(cfg, "general", "host"))) { @@ -385,7 +381,6 @@ static int festival_exec(struct ast_channel *chan, void *vdata) if (fd < 0) { ast_log(LOG_WARNING,"festival_client: can't get socket\n"); ast_config_destroy(cfg); - ast_module_user_remove(u); return -1; } @@ -398,7 +393,6 @@ static int festival_exec(struct ast_channel *chan, void *vdata) if (serverhost == (struct hostent *)0) { ast_log(LOG_WARNING,"festival_client: gethostbyname failed\n"); ast_config_destroy(cfg); - ast_module_user_remove(u); return -1; } memmove(&serv_addr.sin_addr,serverhost->h_addr, serverhost->h_length); @@ -410,7 +404,6 @@ static int festival_exec(struct ast_channel *chan, void *vdata) if (connect(fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) != 0) { ast_log(LOG_WARNING,"festival_client: connect to server failed\n"); ast_config_destroy(cfg); - ast_module_user_remove(u); return -1; } @@ -502,7 +495,6 @@ static int festival_exec(struct ast_channel *chan, void *vdata) ast_log(LOG_WARNING,"Unable to read from cache/festival fd\n"); close(fd); ast_config_destroy(cfg); - ast_module_user_remove(u); return -1; } n += read_data; @@ -529,7 +521,6 @@ static int festival_exec(struct ast_channel *chan, void *vdata) } while (strcmp(ack,"OK\n") != 0); close(fd); ast_config_destroy(cfg); - ast_module_user_remove(u); return res; } |