[asterisk-commits] file: trunk r55748 - in /trunk: ./ apps/app_voicemail.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Feb 20 17:14:08 MST 2007


Author: file
Date: Tue Feb 20 18:14:07 2007
New Revision: 55748

URL: http://svn.digium.com/view/asterisk?view=rev&rev=55748
Log:
Merged revisions 55741 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r55741 | file | 2007-02-20 19:11:20 -0500 (Tue, 20 Feb 2007) | 2 lines

Better handle dropped IMAP connections. (issue #9054 reported by bsmithurst)

........

Modified:
    trunk/   (props changed)
    trunk/apps/app_voicemail.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=55748&r1=55747&r2=55748
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Tue Feb 20 18:14:07 2007
@@ -2468,6 +2468,7 @@
 	fread(buf, len, 1, p);
 	((char *)buf)[len] = '\0';
 	INIT(&str, mail_string, buf, len);
+	init_mailstream(vms, 0);
 	imap_mailbox_name(mailbox, vms, 0, 1);
 	if(!mail_append(vms->mailstream, mailbox, &str))
 		ast_log(LOG_ERROR, "Error while sending the message to %s\n", mailbox);
@@ -2578,12 +2579,10 @@
  	}
 
 	/* If no mailstream exists yet and even after attempting to initialize it fails, bail out */
- 	if (!vms_p->mailstream) {
- 		ret = init_mailstream(vms_p, 0);
-		if (!vms_p->mailstream) {
-			ast_log (LOG_ERROR,"Houston we have a problem - IMAP mailstream is NULL\n");
-			return -1;
-		}
+	ret = init_mailstream(vms_p, 0);
+	if (!vms_p->mailstream) {
+		ast_log (LOG_ERROR,"Houston we have a problem - IMAP mailstream is NULL\n");
+		return -1;
 	}
 
 	if (!ret && vms_p->updated == 1) {



More information about the asterisk-commits mailing list