summaryrefslogtreecommitdiff
path: root/funcs/func_cut.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-07-16 18:24:29 +0000
committerJoshua Colp <jcolp@digium.com>2007-07-16 18:24:29 +0000
commite498488bde119a98ecfc27880a2a9c9e9adfb223 (patch)
tree421e0b496d4bd2074e436c513a30b752557e35c7 /funcs/func_cut.c
parentce8f95d750a4afce1867fac11d04cc66cc8e0880 (diff)
For my next trick I will make it so dialplan functions no longer need to call ast_module_user_add and ast_module_user_remove. These are now called in the ast_func_read and ast_func_write functions outside of the module.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/func_cut.c')
-rw-r--r--funcs/func_cut.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index 7afd978ca..41710b978 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -222,11 +222,8 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
static int acf_sort_exec(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
- struct ast_module_user *u;
int ret = -1;
- u = ast_module_user_add(chan);
-
switch (sort_internal(chan, data, buf, len)) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "SORT() requires an argument\n");
@@ -241,17 +238,12 @@ static int acf_sort_exec(struct ast_channel *chan, const char *cmd, char *data,
ast_log(LOG_ERROR, "Unknown internal error\n");
}
- ast_module_user_remove(u);
-
return ret;
}
static int acf_cut_exec(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
{
int ret = -1;
- struct ast_module_user *u;
-
- u = ast_module_user_add(chan);
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
@@ -270,8 +262,6 @@ static int acf_cut_exec(struct ast_channel *chan, const char *cmd, char *data, c
ast_log(LOG_ERROR, "Unknown internal error\n");
}
- ast_module_user_remove(u);
-
return ret;
}