? apps/rpt_flow.pdf Index: apps/app_voicemail.c =================================================================== RCS file: /home/cvs/scripts/voip/asterisk/1.4.0/apps/app_voicemail.c,v retrieving revision 1.2 diff -u -r1.2 app_voicemail.c --- apps/app_voicemail.c 30 Jan 2007 15:16:31 -0000 1.2 +++ apps/app_voicemail.c 13 Feb 2007 17:01:47 -0000 @@ -2427,6 +2427,8 @@ fread(buf, len, 1, p); ((char *)buf)[len] = '\0'; INIT(&str, mail_string, buf, len); + if (init_mailstream(vms, 0) != 0) + ast_log(LOG_NOTICE, "init_mailstream failed\n"); 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); @@ -2542,8 +2544,7 @@ init_vm_state(vms_p); vmstate_insert(vms_p); } - if (!vms_p->mailstream) - ret = init_mailstream(vms_p, 0); + ret = init_mailstream(vms_p, 0); if (!vms_p->mailstream) { ast_log (LOG_ERROR,"IMAP mailstream is NULL\n"); return -1;