]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Add mail_storage.list_index_corrupted()
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 24 Nov 2016 13:50:01 +0000 (15:50 +0200)
committerGitLab <gitlab@git.dovecot.net>
Fri, 25 Nov 2016 13:25:14 +0000 (15:25 +0200)
The actual implementation is in the next commit.

13 files changed:
src/lib-storage/fail-mail-storage.c
src/lib-storage/index/cydir/cydir-storage.c
src/lib-storage/index/dbox-multi/mdbox-deleted-storage.c
src/lib-storage/index/dbox-multi/mdbox-storage.c
src/lib-storage/index/dbox-single/sdbox-storage.c
src/lib-storage/index/imapc/imapc-storage.c
src/lib-storage/index/maildir/maildir-storage.c
src/lib-storage/index/mbox/mbox-storage.c
src/lib-storage/index/pop3c/pop3c-storage.c
src/lib-storage/index/raw/raw-storage.c
src/lib-storage/index/shared/shared-storage.c
src/lib-storage/mail-storage-private.h
src/plugins/virtual/virtual-storage.c

index 5ad7a6c7f2ea2fb7b6b9e83ef3736f9be92ddac0..36cf2b6beeb06e0767478e50fe95c029022cfef5 100644 (file)
@@ -44,7 +44,8 @@ struct mail_storage fail_storage = {
                fail_storage_get_list_settings,
                NULL,
                fail_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index 17f9f5be20898783310023c138a5e2932b151b44..e2666a91725f36d90889511c0abc752b53e96c77 100644 (file)
@@ -122,7 +122,8 @@ struct mail_storage cydir_storage = {
                cydir_storage_get_list_settings,
                NULL,
                cydir_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index 605084c33102d91dd4397d2ceef9d25c617d1c00..7cb906c78a0236fc34eac423b77a490cbd579265 100644 (file)
@@ -258,7 +258,8 @@ struct mail_storage mdbox_deleted_storage = {
                dbox_storage_get_list_settings,
                NULL,
                mdbox_deleted_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index 5d8d8cd8dfa13c9bef8bdb1fa080f64f5f58bc10..8a5e9f51b5a7c5e5d76857a0725ecbe2afca11f9 100644 (file)
@@ -456,7 +456,8 @@ struct mail_storage mdbox_storage = {
                dbox_storage_get_list_settings,
                mdbox_storage_autodetect,
                mdbox_mailbox_alloc,
-               mdbox_purge
+               mdbox_purge,
+               NULL,
        }
 };
 
index 2c4ce1d7305bd6208e67a50703ca5f33d18ba043..dbb85ff5865698aca14935cbf601121ff13eb091 100644 (file)
@@ -417,7 +417,8 @@ struct mail_storage sdbox_storage = {
                dbox_storage_get_list_settings,
                sdbox_storage_autodetect,
                sdbox_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
@@ -434,7 +435,8 @@ struct mail_storage dbox_storage = {
                dbox_storage_get_list_settings,
                sdbox_storage_autodetect,
                sdbox_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index d03659b77b4c79172835b6cce78466283f1c6ce1..d63db3f3802222085fabf3c6b341d57d6c687807 100644 (file)
@@ -1101,7 +1101,8 @@ struct mail_storage imapc_storage = {
                imapc_storage_get_list_settings,
                NULL,
                imapc_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index e294d270ba825b4ef7a34ba5c1671b1df4cd6cdd..c312c7112e888000da10c4152c9cf62791c81e1e 100644 (file)
@@ -678,7 +678,8 @@ struct mail_storage maildir_storage = {
                maildir_storage_get_list_settings,
                maildir_storage_autodetect,
                maildir_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index 011714fb7bbb5509c597f94ccf3880f69f856cee..8df1e2f0553b2c9bed73fec37e24a69d82963c21 100644 (file)
@@ -821,7 +821,8 @@ struct mail_storage mbox_storage = {
                mbox_storage_get_list_settings,
                mbox_storage_autodetect,
                mbox_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index cad4549ee8630761bf0b498fb829734e8a640a32..490cef1c75b14deb84db7d6645fe583ec8b0ff1e 100644 (file)
@@ -309,7 +309,8 @@ struct mail_storage pop3c_storage = {
                pop3c_storage_get_list_settings,
                NULL,
                pop3c_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index 3e833a6ed22107798213c138c3394bd617bfaded..86a46795d3afbea90d049c744444b65a59cdf3f9 100644 (file)
@@ -214,7 +214,8 @@ struct mail_storage raw_storage = {
                raw_storage_get_list_settings,
                NULL,
                raw_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
 
index ea87a78975f90110047e746cca139d65a69d552a..8aa53dd46e1e6db067310f5820bad77726e84dff 100644 (file)
@@ -375,6 +375,7 @@ struct mail_storage shared_storage = {
                shared_storage_get_list_settings,
                NULL,
                fail_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };
index 74da77c20a39e437702b857a1ce125676f1a7e4d..5a74327ceef0111328fa717e634b11b0d9f65d8d 100644 (file)
@@ -48,6 +48,11 @@ struct mail_storage_vfuncs {
                                         const char *vname,
                                         enum mailbox_flags flags);
        int (*purge)(struct mail_storage *storage);
+       /* Called when mailbox list index corruption has been detected.
+          The callback should add any missing mailboxes to the list index.
+          Returns 0 on success, -1 on temporary failure that didn't properly
+          fix the index. */
+       int (*list_index_corrupted)(struct mail_storage *storage);
 };
 
 union mail_storage_module_context {
index 0e34953d6affb2caa69160a658d6114159d899e2..9fcbfd53a73fe1f23c01d25448ea98de6d9e2b56 100644 (file)
@@ -777,7 +777,8 @@ struct mail_storage virtual_storage = {
                virtual_storage_get_list_settings,
                NULL,
                virtual_mailbox_alloc,
-               NULL
+               NULL,
+               NULL,
        }
 };