[asterisk-commits] mmichelson: branch 1.6.0 r165144 - in /branches/1.6.0: ./ apps/app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 17 11:55:03 CST 2008


Author: mmichelson
Date: Wed Dec 17 11:55:02 2008
New Revision: 165144

URL: http://svn.digium.com/view/asterisk?view=rev&rev=165144
Log:
Merged revisions 165142-165143 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r165142 | mmichelson | 2008-12-17 11:52:50 -0600 (Wed, 17 Dec 2008) | 10 lines

Use the create_vm_state_from_user function in a place where
it was not being used before. Also, I've moved the urgent
folder check in messagecount() up a bit so that the flow is
a bit better.

This was something I noticed while taking a look at issue
#13973, although I don't think this is the underlying cause
of the issue.


........
r165143 | mmichelson | 2008-12-17 11:53:37 -0600 (Wed, 17 Dec 2008) | 3 lines

And actually assign the function to a pointer...


........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/apps/app_voicemail.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/apps/app_voicemail.c?view=diff&rev=165144&r1=165143&r2=165144
==============================================================================
--- branches/1.6.0/apps/app_voicemail.c (original)
+++ branches/1.6.0/apps/app_voicemail.c Wed Dec 17 11:55:02 2008
@@ -1455,6 +1455,12 @@
 	int ret = 0;
 	int fold = folder_int(folder);
 	
+	/* If URGENT, then look at INBOX */
+	if (fold == 11) {
+		fold = NEW_FOLDER;
+		urgent = 1;
+	}
+
 	if (ast_strlen_zero(mailbox))
 		return 0;
 
@@ -1501,19 +1507,7 @@
 	}
 
 	if (!vms_p) {
-		ast_debug(3, "Adding new vmstate for %s\n", vmu->imapuser);
-		if (!(vms_p = ast_calloc(1, sizeof(*vms_p)))) {
-			return -1;
-		}
-		ast_copy_string(vms_p->imapuser, vmu->imapuser, sizeof(vms_p->imapuser));
-		ast_copy_string(vms_p->username, mailbox, sizeof(vms_p->username)); /* save for access from interactive entry point */
-		vms_p->mailstream = NIL; /* save for access from interactive entry point */
-		ast_debug(3, "Copied %s to %s\n", vmu->imapuser, vms_p->imapuser);
-		vms_p->updated = 1;
-		/* set mailbox to INBOX! */
-		ast_copy_string(vms_p->curbox, mbox(fold), sizeof(vms_p->curbox));
-		init_vm_state(vms_p);
-		vmstate_insert(vms_p);
+		vms_p = create_vm_state_from_user(vmu);
 	}
 	ret = init_mailstream(vms_p, fold);
 	if (!vms_p->mailstream) {




More information about the asterisk-commits mailing list