issue #5704
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 12 Nov 2005 02:39:06 +0000 (02:39 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 12 Nov 2005 02:39:06 +0000 (02:39 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7085 65c4cc65-6c06-0410-ace0-fbb531ad65f3

ChangeLog
apps/app_voicemail.c

index 5ecdeae..b4af88a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2005-11-11  Kevin P. Fleming  <kpfleming@digium.com>
 
        * apps/app_voicemail.c (forward_message): correct bugs in message forwarding (issue #5718)
+       (copy_message): use correct path for locking (issue #5704)
 
        * apps/app_dial.c (wait_for_answer): correct flag copying for automon feature (issue #5720)
 
index c8a694c..238623f 100755 (executable)
@@ -2285,7 +2285,7 @@ static int copy_message(struct ast_channel *chan, struct ast_vm_user *vmu, int i
        make_dir(fromdir, sizeof(fromdir), vmu->context, vmu->mailbox, frombox);
        make_file(frompath, sizeof(frompath), fromdir, msgnum);
 
-       if (vm_lock_path(topath))
+       if (vm_lock_path(todir))
                return ERROR_LOCK_PATH;
 
        recipmsgnum = 0;
@@ -2300,7 +2300,7 @@ static int copy_message(struct ast_channel *chan, struct ast_vm_user *vmu, int i
        } else {
                ast_log(LOG_ERROR, "Recipient mailbox %s@%s is full\n", recip->mailbox, recip->context);
        }
-       ast_unlock_path(topath);
+       ast_unlock_path(todir);
        notify_new_message(chan, recip, recipmsgnum, duration, fmt, chan->cid.cid_num, chan->cid.cid_name);
        
        return 0;