]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 22596 via svnmerge from
authorMatt O'Gorman <mogorman@digium.com>
Wed, 26 Apr 2006 19:22:55 +0000 (19:22 +0000)
committerMatt O'Gorman <mogorman@digium.com>
Wed, 26 Apr 2006 19:22:55 +0000 (19:22 +0000)
https://svn.digium.com/svn/asterisk/branches/1.2

........
r22596 | mogorman | 2006-04-26 14:18:55 -0500 (Wed, 26 Apr 2006) | 3 lines

do not allow for users to forward voicemail to
themselves, patch from 7001

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22597 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_voicemail.c

index 659bd27d3b474743436d7f32de6ac440e324b3be..f478e8fb94b9d9b86e2db67f7b0c89200b830691 100644 (file)
@@ -3426,8 +3426,8 @@ static int forward_message(struct ast_channel *chan, char *context, char *dir, i
                /* start optimistic */
                valid_extensions = 1;
                while (s) {
-                       /* find_user is going to ast_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))) {
                                AST_LIST_INSERT_HEAD(&extensions, receiver, list);
                                found++;
                        } else {