[asterisk-commits] russell: trunk r164623 - /trunk/apps/app_minivm.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Dec 16 09:00:27 CST 2008
Author: russell
Date: Tue Dec 16 09:00:27 2008
New Revision: 164623
URL: http://svn.digium.com/view/asterisk?view=rev&rev=164623
Log:
Set MINIVM_ACCMESS_STATUS in all cases. Also, remove a variable that was not needed.
(closes issue #14081)
Reported by: pkempgen
Modified:
trunk/apps/app_minivm.c
Modified: trunk/apps/app_minivm.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_minivm.c?view=diff&rev=164623&r1=164622&r2=164623
==============================================================================
--- trunk/apps/app_minivm.c (original)
+++ trunk/apps/app_minivm.c Tue Dec 16 09:00:27 2008
@@ -2194,7 +2194,6 @@
{
int argc = 0;
char *argv[2];
- int res = 0;
char filename[PATH_MAX];
char tmp[PATH_MAX];
char *domain;
@@ -2236,8 +2235,10 @@
error = TRUE;
}
- if (error)
+ if (error) {
+ pbx_builtin_setvar_helper(chan, "MINIVM_ACCMESS_STATUS", "FAILED");
return -1;
+ }
ast_copy_string(tmp, argv[0], sizeof(tmp));
username = tmp;
@@ -2248,6 +2249,7 @@
}
if (ast_strlen_zero(domain) || ast_strlen_zero(username)) {
ast_log(LOG_ERROR, "Need username at domain as argument. Sorry. Argument 0 %s\n", argv[0]);
+ pbx_builtin_setvar_helper(chan, "MINIVM_ACCMESS_STATUS", "FAILED");
return -1;
}
@@ -2285,10 +2287,10 @@
if(ast_test_flag(vmu, MVM_ALLOCED))
free_user(vmu);
+ pbx_builtin_setvar_helper(chan, "MINIVM_NOTIFY_STATUS", "SUCCESS");
/* Ok, we're ready to rock and roll. Return to dialplan */
- return res;
-
+ return 0;
}
/*! \brief Append new mailbox to mailbox list from configuration file */
More information about the asterisk-commits
mailing list