diff options
author | Damien Riegel <damien@riegel.io> | 2016-05-26 14:05:42 -0700 |
---|---|---|
committer | Damien Riegel <damien@riegel.io> | 2016-05-26 14:05:42 -0700 |
commit | 938a56572752a0f7fc31660222444cab91a30ece (patch) | |
tree | dd3acb055af2f6ab49245bdab0d36e003076ea45 /imap | |
parent | 127fd40600a18cbd6dc2d5580f49ac75fc71e659 (diff) |
add check operation to struct mx_ops
In mx_check_mailbox switch case, we simply call
<mailbox>_check_mailbox, so this operation can be move into the mx_ops
structure pretty easily.
This commit adds a mandatory "check" operation to struct mx_ops and
change all mailboxes to use it. Check functions are made static as they
are only used in their respective source files now.
Diffstat (limited to 'imap')
-rw-r--r-- | imap/imap.c | 3 | ||||
-rw-r--r-- | imap/imap.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/imap/imap.c b/imap/imap.c index d565ad8d..c334c441 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1464,7 +1464,7 @@ int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force) return result; } -int imap_check_mailbox_reopen (CONTEXT *ctx, int *index_hint) +static int imap_check_mailbox_reopen (CONTEXT *ctx, int *index_hint) { int rc; @@ -2067,4 +2067,5 @@ struct mx_ops mx_imap_ops = { .open = imap_open_mailbox, .close = imap_close_mailbox, .open_new_msg = imap_open_new_message, + .check = imap_check_mailbox_reopen, }; diff --git a/imap/imap.h b/imap/imap.h index 1defdd47..132ae2b9 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -34,7 +34,6 @@ typedef struct /* imap.c */ int imap_access (const char*, int); int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force); -int imap_check_mailbox_reopen (CONTEXT *ctx, int *index_hint); 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); |