diff options
Diffstat (limited to 'imap')
-rw-r--r-- | imap/imap.c | 8 | ||||
-rw-r--r-- | imap/imap.h | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/imap/imap.c b/imap/imap.c index 228b3b29..e9e84191 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -554,7 +554,7 @@ static char* imap_get_flags (LIST** hflags, char* s) return s; } -int imap_open_mailbox (CONTEXT* ctx) +static int imap_open_mailbox (CONTEXT* ctx) { IMAP_DATA *idata; IMAP_STATUS* status; @@ -578,7 +578,6 @@ int imap_open_mailbox (CONTEXT* ctx) /* once again the context is new */ ctx->data = idata; - ctx->mx_close = imap_close_mailbox; /* Clean up path and replace the one in the ctx */ imap_fix_path (idata, mx.mbox, buf, sizeof (buf)); @@ -2038,3 +2037,8 @@ int imap_complete(char* dest, size_t dlen, char* path) { return -1; } + +struct mx_ops mx_imap_ops = { + .open = imap_open_mailbox, + .close = imap_close_mailbox, +}; diff --git a/imap/imap.h b/imap/imap.h index a914b404..132ae2b9 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -35,7 +35,6 @@ typedef struct int imap_access (const char*, int); int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force); int imap_delete_mailbox (CONTEXT* idata, IMAP_MBOX mx); -int imap_open_mailbox (CONTEXT *ctx); int imap_open_mailbox_append (CONTEXT *ctx); int imap_sync_mailbox (CONTEXT *ctx, int expunge, int *index_hint); int imap_close_mailbox (CONTEXT *ctx); @@ -48,6 +47,8 @@ int imap_complete (char* dest, size_t dlen, char* path); void imap_allow_reopen (CONTEXT *ctx); void imap_disallow_reopen (CONTEXT *ctx); +extern struct mx_ops mx_imap_ops; + /* browse.c */ int imap_browse (char* path, struct browser_state* state); int imap_mailbox_state (const char* path, struct mailbox_state* state); |