app_voicemail/IMAP: function 'save_to_folder' creates wrong folder
authorAlexei Gradinari <alex2grad@gmail.com>
Thu, 7 Apr 2016 17:02:19 +0000 (13:02 -0400)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 12 Apr 2016 03:31:21 +0000 (22:31 -0500)
If try to move message to Cust1 (number 5)
the function 'save_to_folder' tries to create Greeting folder instead of Cust1.

This patch fixed it by setting GREETINGS_FOLDER = -1

ASTERISK-24927 #close

Change-Id: I03d1a761894bcc2d130ec9b003bbcddc28e25c51

apps/app_voicemail.c

index aa8da5f..9e646a5 100644 (file)
@@ -622,12 +622,12 @@ static AST_LIST_HEAD_STATIC(vmstates, vmstate);
 #define OPERATOR_EXIT     300
 
 enum vm_box {
-       NEW_FOLDER,
-       OLD_FOLDER,
-       WORK_FOLDER,
-       FAMILY_FOLDER,
-       FRIENDS_FOLDER,
-       GREETINGS_FOLDER
+       NEW_FOLDER =            0,
+       OLD_FOLDER =            1,
+       WORK_FOLDER =           2,
+       FAMILY_FOLDER =         3,
+       FRIENDS_FOLDER =        4,
+       GREETINGS_FOLDER =      -1
 };
 
 enum vm_option_flags {