[asterisk-commits] branch 1.2 r22596 - /branches/1.2/apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Apr 26 12:18:56 MST 2006


Author: mogorman
Date: Wed Apr 26 14:18:55 2006
New Revision: 22596

URL: http://svn.digium.com/view/asterisk?rev=22596&view=rev
Log:
do not allow for users to forward voicemail to
themselves, patch from 7001

Modified:
    branches/1.2/apps/app_voicemail.c

Modified: branches/1.2/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_voicemail.c?rev=22596&r1=22595&r2=22596&view=diff
==============================================================================
--- branches/1.2/apps/app_voicemail.c (original)
+++ branches/1.2/apps/app_voicemail.c Wed Apr 26 14:18:55 2006
@@ -3458,8 +3458,8 @@
 		/* start optimistic */
 		valid_extensions = 1;
 		while (s) {
-			/* find_user is going to malloc since we have a NULL as first argument */
-			if ((receiver = find_user(NULL, context, s))) {
+			/* Don't forward to ourselves.  find_user is going to malloc since we have a NULL as first argument */
+			if (strcmp(s,sender->mailbox) && (receiver = find_user(NULL, context, s))) {
 				if (!extensions)
 					vmtmp = extensions = receiver;
 				else {



More information about the asterisk-commits mailing list