aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-10 21:57:06 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-10 21:57:06 +0000
commit243b2a3a5ffd4c50ba3fa9d3d6c91baea73e4124 (patch)
tree819b8d2ed60a9e279acbbf392a5dce93d21c439d /apps
parent61db62e7f85cdf022493bb814882292e37b54cfc (diff)
Let us leave a voicemail for ourself if we have logged into VoiceMailMain and chosen
to leave a message. (closes issue #11735, reported and patched by jamessan) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97925 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 7b8b0dd23..8ba4b5eaf 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -4070,8 +4070,8 @@ static int forward_message(struct ast_channel *chan, char *context, struct vm_st
/* start optimistic */
valid_extensions = 1;
while (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))) {
+ /* Don't forward to ourselves but allow leaving a message for ourselves (flag == 1). find_user is going to malloc since we have a NULL as first argument */
+ if ((flag == 1 || strcmp(s,sender->mailbox)) && (receiver = find_user(NULL, context, s))) {
AST_LIST_INSERT_HEAD(&extensions, receiver, list);
found++;
} else {