summaryrefslogtreecommitdiff
path: root/apps/app_chanspy.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-07-16 14:39:29 +0000
committerJoshua Colp <jcolp@digium.com>2007-07-16 14:39:29 +0000
commitb8cd949ccea7f878578f16def5b3144c050d315e (patch)
tree1236d574745c7d4d49bb3fb658e3a6bdd3e88a22 /apps/app_chanspy.c
parent96a646734fe34d65077cbe49c533b80759fc12e8 (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: https://origsvn.digium.com/svn/asterisk/trunk@75200 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_chanspy.c')
-rw-r--r--apps/app_chanspy.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index fc3f4b920..80f3c530c 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -626,7 +626,6 @@ exit:
static int chanspy_exec(struct ast_channel *chan, void *data)
{
- struct ast_module_user *u;
char *options = NULL;
char *spec = NULL;
char *argv[2];
@@ -641,8 +640,6 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
data = ast_strdupa(data);
- u = ast_module_user_add(chan);
-
if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
spec = argv[0];
if (argc > 1)
@@ -680,7 +677,6 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
- ast_module_user_remove(u);
return -1;
}
@@ -702,14 +698,11 @@ static int chanspy_exec(struct ast_channel *chan, void *data)
if (oldwf && ast_set_write_format(chan, oldwf) < 0)
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
- ast_module_user_remove(u);
-
return res;
}
static int extenspy_exec(struct ast_channel *chan, void *data)
{
- struct ast_module_user *u;
char *options = NULL;
char *exten = NULL;
char *context = NULL;
@@ -725,8 +718,6 @@ static int extenspy_exec(struct ast_channel *chan, void *data)
data = ast_strdupa(data);
- u = ast_module_user_add(chan);
-
if ((argc = ast_app_separate_args(data, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
context = argv[0];
if (!ast_strlen_zero(argv[0]))
@@ -765,7 +756,6 @@ static int extenspy_exec(struct ast_channel *chan, void *data)
oldwf = chan->writeformat;
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
- ast_module_user_remove(u);
return -1;
}
@@ -787,8 +777,6 @@ static int extenspy_exec(struct ast_channel *chan, void *data)
if (oldwf && ast_set_write_format(chan, oldwf) < 0)
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
- ast_module_user_remove(u);
-
return res;
}