[svn-commits] bebuild: tag 11.4.0-rc3 r388884 - in /tags/11.4.0-rc3: ./ apps/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 15 14:09:40 CDT 2013


Author: bebuild
Date: Wed May 15 14:09:37 2013
New Revision: 388884

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=388884
Log:
Update .version, ChangeLog, remove old summaries, merge r388816

Removed:
    tags/11.4.0-rc3/asterisk-11.4.0-rc2-summary.html
    tags/11.4.0-rc3/asterisk-11.4.0-rc2-summary.txt
Modified:
    tags/11.4.0-rc3/   (props changed)
    tags/11.4.0-rc3/.version
    tags/11.4.0-rc3/ChangeLog
    tags/11.4.0-rc3/apps/app_voicemail.c

Propchange: tags/11.4.0-rc3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed May 15 14:09:37 2013
@@ -1,2 +1,2 @@
-/branches/11:385917,386159,386286,387038,388108
+/branches/11:385917,386159,386286,387038,388108,388816
 /certified/branches/1.8.15:382389

Modified: tags/11.4.0-rc3/.version
URL: http://svnview.digium.com/svn/asterisk/tags/11.4.0-rc3/.version?view=diff&rev=388884&r1=388883&r2=388884
==============================================================================
--- tags/11.4.0-rc3/.version (original)
+++ tags/11.4.0-rc3/.version Wed May 15 14:09:37 2013
@@ -1,1 +1,1 @@
-11.4.0-rc2
+11.4.0-rc3

Modified: tags/11.4.0-rc3/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/tags/11.4.0-rc3/ChangeLog?view=diff&rev=388884&r1=388883&r2=388884
==============================================================================
--- tags/11.4.0-rc3/ChangeLog (original)
+++ tags/11.4.0-rc3/ChangeLog Wed May 15 14:09:37 2013
@@ -1,3 +1,18 @@
+2013-05-15  Asterisk Development Team <asteriskteam at digium.com>
+
+	* Asterisk 11.4.0-rc3 Released.
+
+	* Fix VM snapshot handling for combined INBOX.
+
+	  The snapshot API contains an option that allow for combining of new
+	  and old messages within a single snapshot. New messages, however,
+	  include options beyond just 'INBOX' - it also includes the Urgent
+	  folder. A previous patch that combined INBOX and Urgent accidentally
+	  impacted snapshots that attempted to gain messages from just the Old
+	  folder. This patch fixes the snapshot gathering such that the API
+	  returns the appropriate messages for the folder selected, with and
+	  without the combine option.
+
 2013-05-09  Asterisk Development Team <asteriskteam at digium.com>
 
 	* Asterisk 11.4.0-rc2 Released.

Modified: tags/11.4.0-rc3/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/tags/11.4.0-rc3/apps/app_voicemail.c?view=diff&rev=388884&r1=388883&r2=388884
==============================================================================
--- tags/11.4.0-rc3/apps/app_voicemail.c (original)
+++ tags/11.4.0-rc3/apps/app_voicemail.c Wed May 15 14:09:37 2013
@@ -15018,25 +15018,20 @@
 	mailbox_snapshot->folders = ARRAY_LEN(mailbox_folders);
 
 	for (i = 0; i < mailbox_snapshot->folders; i++) {
-		int combining_old = 0;
-		/* Assume we are combining folders if:
-		 *  - The current index is the old folder index OR
-		 *  - The current index is urgent and we were looking for INBOX or all folders OR
-		 *  - The current index is INBOX and we were looking for Urgent or all folders
+		int msg_folder_index = i;
+
+		/* We want this message in the snapshot if any of the following:
+		 *   No folder was specified.
+		 *   The specified folder matches the current folder.
+		 *   The specified folder is INBOX AND we were asked to combine messages AND the current folder is either Old or Urgent.
 		 */
-		if ((i == old_index ||
-			(i == urgent_index && (this_index_only == inbox_index || this_index_only == -1)) ||
-			(i == inbox_index && (this_index_only == urgent_index || this_index_only == -1))) && (combine_INBOX_and_OLD)) {
-			combining_old = 1;
-		}
-
-		/* This if statement is confusing looking.  Here is what it means in english.
-		 * - If a folder is given to the function and that folder's index is not the one we are iterating over, skip it...
-		 * - Unless we are combining old and new messages and the current index is one of old, new, or urgent folders
-		 */
-		if ((this_index_only != -1 && this_index_only != i) &&
-			!(combining_old && (i == old_index || i == urgent_index || i == inbox_index))) {
+		if (!(this_index_only == -1 || this_index_only == i || (this_index_only == inbox_index && combine_INBOX_and_OLD && (i == old_index || i == urgent_index)))) {
 			continue;
+		}
+
+		/* Make sure that Old or Urgent messages are marked as being in INBOX. */
+		if (combine_INBOX_and_OLD && (i == old_index || i == urgent_index)) {
+			msg_folder_index = inbox_index;
 		}
 
 		memset(&vms, 0, sizeof(vms));
@@ -15053,7 +15048,7 @@
 
 		/* Iterate through each msg, storing off info */
 		if (vms.lastmsg != -1) {
-			if ((vm_msg_snapshot_create(vmu, &vms, mailbox_snapshot, combining_old ? inbox_index : i, i, descending, sort_val))) {
+			if ((vm_msg_snapshot_create(vmu, &vms, mailbox_snapshot, msg_folder_index, i, descending, sort_val))) {
 				ast_log(LOG_WARNING, "Failed to create msg snapshots for %s@%s\n", mailbox, context);
 				goto snapshot_cleanup;
 			}




More information about the svn-commits mailing list