aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-26 19:18:55 +0000
committermogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-26 19:18:55 +0000
commit2969fc4f1743d294bca64d4e209bbcb4609e12c3 (patch)
tree82e108effb3b05a7453a12682abbc1fe8bf5c432 /apps
parent95c85ca4977067f371652d2cac438c7ce836c257 (diff)
do not allow for users to forward voicemail to
themselves, patch from 7001 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@22596 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_voicemail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 70a27f672..5b2463af5 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3458,8 +3458,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 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 {