--- Functionality changes from Asterisk 14.5.0 to Asterisk 14.6.0 ------------
------------------------------------------------------------------------------
+app_voicemail
+------------------
+ * A new global option "imap_poll_logout" was added to specify whether need to
+ disconnect from the IMAP server after polling of mailboxes.
+ Default: no
+
res_pjsip
------------------
* A new endpoint option "refer_blind_progress" was added to turn off notifying
static int expungeonhangup = 1;
static int imapgreetings = 0;
+static int imap_poll_logout = 0;
static char delimiter = '\0';
/* mail_open cannot be protected on a stream basis */
static int imap_delete_old_greeting (char *dir, struct vm_state *vms);
static void check_quota(struct vm_state *vms, char *mailbox);
static int open_mailbox(struct vm_state *vms, struct ast_vm_user *vmu, int box);
+static void imap_logout(const char *mailbox_id);
+
struct vmstate {
struct vm_state *vms;
AST_LIST_ENTRY(vmstate) list;
strcat(mailbox_full, context);
inboxcount2(mailbox_full, &urgent, &new, &old);
+#ifdef IMAP_STORAGE
+ imap_logout(mailbox_full);
+#endif
queue_mwi_event(NULL, mailbox_full, urgent, new, old);
return 0;
inboxcount2(mwi_sub->mailbox, &urgent, &new, &old);
+#ifdef IMAP_STORAGE
+ if (imap_poll_logout) {
+ imap_logout(mwi_sub->mailbox);
+ }
+#endif
+
if (urgent != mwi_sub->old_urgent || new != mwi_sub->old_new || old != mwi_sub->old_old) {
mwi_sub->old_urgent = urgent;
mwi_sub->old_new = new;
} else {
ast_copy_string(greetingfolder, imapfolder, sizeof(greetingfolder));
}
+ if ((val = ast_variable_retrieve(cfg, "general", "imap_poll_logout"))) {
+ imap_poll_logout = ast_true(val);
+ } else {
+ imap_poll_logout = 0;
+ }
/* There is some very unorthodox casting done here. This is due
* to the way c-client handles the argument passed in. It expects a
;imapclosetimeout=60 ; The TCP close timeout (in seconds)
;imapreadtimeout=60 ; The TCP read timeout (in seconds)
;imapwritetimeout=60 ; The TCP write timeout (in seconds)
+;imap_poll_logout=no ; If pollmailboxes=yes, then specify whether need to
+ ; disconnect from the IMAP server after polling.
+ ; Default: no
; -----------------------------------------------------------------------------
;