# HG changeset patch
# User Damien Riegel <[email protected]>
# Date 1465340838 14400
# Tue Jun 07 19:07:18 2016 -0400
# Node ID 72e7b7125f7e7359e54ef73266a3d39b8d6e2ec2
# Parent 2b64e02c7d5760a0747ff5d2605f5a6af5388617
add imap_sync_expunge_mailbox function
Add a function that is a simple wrapper around imap_sync_mailbox with
the expunge parameter set. This allows to have mailbox sync operations
with the same prototype in 'sync_mailbox'.
diff -r 2b64e02c7d57 -r 72e7b7125f7e imap/imap.c
--- a/imap/imap.c Tue Jun 07 19:02:14 2016 -0400
+++ b/imap/imap.c Tue Jun 07 19:07:18 2016 -0400
@@ -1354,6 +1354,12 @@
return rc;
}
+int imap_sync_expunge_mailbox (CONTEXT* ctx, int* index_hint)
+{
+ /* sync with EXPUNGE */
+ return imap_sync_mailbox (ctx, 1, index_hint);
+}
+
/* imap_close_mailbox: clean up IMAP data in CONTEXT */
int imap_close_mailbox (CONTEXT* ctx)
{
diff -r 2b64e02c7d57 -r 72e7b7125f7e imap/imap.h
--- a/imap/imap.h Tue Jun 07 19:02:14 2016 -0400
+++ b/imap/imap.h Tue Jun 07 19:07:18 2016 -0400
@@ -37,6 +37,7 @@
int imap_delete_mailbox (CONTEXT* idata, IMAP_MBOX mx);
int imap_open_mailbox_append (CONTEXT *ctx);
int imap_sync_mailbox (CONTEXT *ctx, int expunge, int *index_hint);
+int imap_sync_expunge_mailbox (CONTEXT *ctx, int *index_hint);
int imap_close_mailbox (CONTEXT *ctx);
int imap_buffy_check (int force);
int imap_status (char *path, int queue);
diff -r 2b64e02c7d57 -r 72e7b7125f7e mx.c
--- a/mx.c Tue Jun 07 19:02:14 2016 -0400
+++ b/mx.c Tue Jun 07 19:07:18 2016 -0400
@@ -775,8 +775,7 @@
#ifdef USE_IMAP
case MUTT_IMAP:
- /* extra argument means EXPUNGE */
- rc = imap_sync_mailbox (ctx, 1, index_hint);
+ rc = imap_sync_expunge_mailbox (ctx, index_hint);
break;
#endif /* USE_IMAP */