mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
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
This commit is contained in:
@@ -47,15 +47,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
|
||||
|
||||
static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *argsstr, char *buf, size_t len)
|
||||
{
|
||||
struct ast_module_user *u;
|
||||
char *context;
|
||||
AST_DECLARE_APP_ARGS(args,
|
||||
AST_APP_ARG(vmbox);
|
||||
AST_APP_ARG(folder);
|
||||
);
|
||||
|
||||
u = ast_module_user_add(chan);
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
AST_STANDARD_APP_ARGS(args, argsstr);
|
||||
@@ -72,8 +69,6 @@ static int acf_vmcount_exec(struct ast_channel *chan, const char *cmd, char *arg
|
||||
}
|
||||
|
||||
snprintf(buf, len, "%d", ast_app_messagecount(context, args.vmbox, args.folder));
|
||||
|
||||
ast_module_user_remove(u);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user