aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_disa.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-16 14:39:29 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-16 14:39:29 +0000
commitd17ff1ea42571817d74962062410ca54a06b2053 (patch)
tree1236d574745c7d4d49bb3fb658e3a6bdd3e88a22 /apps/app_disa.c
parent9e24ed5ccff762fa9d412d1a1321df2de1b26423 (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_disa.c')
-rw-r--r--apps/app_disa.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/apps/app_disa.c b/apps/app_disa.c
index 99d4f97eb..dadfdcc4a 100644
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -123,7 +123,6 @@ static int disa_exec(struct ast_channel *chan, void *data)
int i,j,k,x,did_ignore,special_noanswer;
int firstdigittimeout = 20000;
int digittimeout = 10000;
- struct ast_module_user *u;
struct ast_flags flags;
char *tmp, exten[AST_MAX_EXTENSION],acctcode[20]="";
char pwline[256];
@@ -145,8 +144,6 @@ static int disa_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "DISA requires an argument (passcode/passcode file)\n");
return -1;
}
-
- u = ast_module_user_add(chan);
if (chan->pbx) {
firstdigittimeout = chan->pbx->rtimeout*1000;
@@ -155,12 +152,10 @@ static int disa_exec(struct ast_channel *chan, void *data)
if (ast_set_write_format(chan,AST_FORMAT_ULAW)) {
ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n", chan->name);
- ast_module_user_remove(u);
return -1;
}
if (ast_set_read_format(chan,AST_FORMAT_ULAW)) {
ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n", chan->name);
- ast_module_user_remove(u);
return -1;
}
@@ -218,13 +213,11 @@ static int disa_exec(struct ast_channel *chan, void *data)
f = ast_read(chan);
if (f == NULL) {
- ast_module_user_remove(u);
return -1;
}
if ((f->frametype == AST_FRAME_CONTROL) &&
(f->subclass == AST_CONTROL_HANGUP)) {
ast_frfree(f);
- ast_module_user_remove(u);
return -1;
}
if (f->frametype == AST_FRAME_VOICE) {
@@ -254,7 +247,6 @@ static int disa_exec(struct ast_channel *chan, void *data)
fp = fopen(args.passcode,"r");
if (!fp) {
ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
- ast_module_user_remove(u);
return -1;
}
pwline[0] = 0;
@@ -361,7 +353,6 @@ static int disa_exec(struct ast_channel *chan, void *data)
if (special_noanswer) flags.flags = 0;
ast_cdr_reset(chan->cdr, &flags);
ast_explicit_goto(chan, args.context, exten, 1);
- ast_module_user_remove(u);
return 0;
}
}
@@ -382,7 +373,6 @@ reorder:
ast_frfree(f);
}
ast_playtones_stop(chan);
- ast_module_user_remove(u);
return -1;
}