[svn-commits] trunk - r7956 in /trunk: ./ apps/app_voicemail.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Jan 10 19:31:29 CST 2006


Author: tilghman
Date: Tue Jan 10 19:31:28 2006
New Revision: 7956

URL: http://svn.digium.com/view/asterisk?rev=7956&view=rev
Log:
Merged revisions 7955 via svnmerge from
/branches/1.2

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jan 10 19:31:28 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7705,7707-7737,7739-7770,7772-7791,7793-7811,7813-7869,7872-7897,7901-7914,7916-7939
+/branches/1.2:1-7489,7491-7496,7498-7516,7518-7528,7530-7545,7547-7549,7551,7553-7556,7558-7579,7581-7585,7587-7594,7596-7604,7606-7640,7642-7662,7664-7705,7707-7737,7739-7770,7772-7791,7793-7811,7813-7869,7872-7897,7901-7914,7916-7939,7955

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?rev=7956&r1=7955&r2=7956&view=diff
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue Jan 10 19:31:28 2006
@@ -5621,10 +5621,10 @@
 static int vmauthenticate(struct ast_channel *chan, void *data)
 {
 	struct localuser *u;
-	char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION];
+	char *s = data, *user=NULL, *context=NULL, mailbox[AST_MAX_EXTENSION] = "";
 	struct ast_vm_user vmus;
 	char *options = NULL;
-	int silent = 0;
+	int silent = 0, skipuser = 0;
 	int res = -1;
 
 	LOCAL_USER_ADD(u);
@@ -5641,6 +5641,9 @@
 			s = user;
 			user = strsep(&s, "@");
 			context = strsep(&s, "");
+			if (!ast_strlen_zero(user))
+				skipuser++;
+			ast_copy_string(mailbox, user, sizeof(mailbox));
 		}
 	}
 
@@ -5648,9 +5651,10 @@
 		silent = (strchr(options, 's')) != NULL;
 	}
 
-	if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, 0, 3, silent)) {
+	if (!vm_authenticate(chan, mailbox, sizeof(mailbox), &vmus, context, NULL, skipuser, 3, silent)) {
 		pbx_builtin_setvar_helper(chan, "AUTH_MAILBOX", mailbox);
 		pbx_builtin_setvar_helper(chan, "AUTH_CONTEXT", vmus.context);
+		ast_play_and_wait(chan, "auth-thankyou");
 		res = 0;
 	}
 



More information about the svn-commits mailing list