]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dbox: dbox_mailbox_open() - Drop unused ctime
authorMarco Bettini <marco.bettini@open-xchange.com>
Tue, 28 Feb 2023 11:30:22 +0000 (11:30 +0000)
committermarkus.valentin <markus.valentin@open-xchange.com>
Fri, 10 Mar 2023 10:51:41 +0000 (10:51 +0000)
src/lib-storage/index/dbox-common/dbox-storage.c
src/lib-storage/index/dbox-common/dbox-storage.h
src/lib-storage/index/dbox-multi/mdbox-storage.c
src/lib-storage/index/dbox-single/sdbox-storage.c

index 2b546f8477834ff948c2980f0a61a0e5c0ccce87..8ff212bc62cf391b0f6f8ef9bab0e0864d089968 100644 (file)
@@ -217,14 +217,12 @@ dbox_cleanup_temp_files(struct mailbox *box, const char *path,
        return FALSE;
 }
 
-int dbox_mailbox_check_existence(struct mailbox *box, time_t *path_ctime_r)
+int dbox_mailbox_check_existence(struct mailbox *box)
 {
        const char *index_path, *box_path = mailbox_get_path(box);
        struct stat st;
        int ret = -1;
 
-       *path_ctime_r = (time_t)-1;
-
        if (box->list->set.iter_from_index_dir) {
                /* Just because the index directory exists, it doesn't mean
                   that the mailbox is selectable. Check that by seeing if
@@ -244,8 +242,6 @@ int dbox_mailbox_check_existence(struct mailbox *box, time_t *path_ctime_r)
        }
        if (ret < 0) {
                ret = stat(box_path, &st);
-               if (ret == 0)
-                       *path_ctime_r = st.st_ctime;
        }
 
        if (ret == 0) {
@@ -264,7 +260,7 @@ int dbox_mailbox_check_existence(struct mailbox *box, time_t *path_ctime_r)
        }
 }
 
-int dbox_mailbox_open(struct mailbox *box, time_t path_ctime ATTR_UNUSED)
+int dbox_mailbox_open(struct mailbox *box)
 {
        if (index_storage_mailbox_open(box, FALSE) < 0)
                return -1;
index 248f5294d69b43871c70ff025fc38c818d7f1c9a..144775d4f22f76306090c2d9173b23b98bbc0bfe 100644 (file)
@@ -71,8 +71,8 @@ int dbox_storage_create(struct mail_storage *storage,
 void dbox_storage_destroy(struct mail_storage *storage);
 uint32_t dbox_get_uidvalidity_next(struct mailbox_list *list);
 void dbox_notify_changes(struct mailbox *box);
-int dbox_mailbox_check_existence(struct mailbox *box, time_t *path_ctime_r);
-int dbox_mailbox_open(struct mailbox *box, time_t path_ctime);
+int dbox_mailbox_check_existence(struct mailbox *box);
+int dbox_mailbox_open(struct mailbox *box);
 void dbox_mailbox_close(struct mailbox *box);
 int dbox_mailbox_create(struct mailbox *box,
                        const struct mailbox_update *update, bool directory);
index 76c30619ec5e8cebcd3bc758695c1739cca2020b..8fddf3190768a1edbb9283736a16f2b6a4e418f0 100644 (file)
@@ -178,11 +178,10 @@ mdbox_mailbox_alloc(struct mail_storage *storage, struct mailbox_list *list,
 int mdbox_mailbox_open(struct mailbox *box)
 {
        struct mdbox_mailbox *mbox = MDBOX_MAILBOX(box);
-       time_t path_ctime;
 
-       if (dbox_mailbox_check_existence(box, &path_ctime) < 0)
+       if (dbox_mailbox_check_existence(box) < 0)
                return -1;
-       if (dbox_mailbox_open(box, path_ctime) < 0)
+       if (dbox_mailbox_open(box) < 0)
                return -1;
 
        mbox->ext_id =
index cc0782d2bd1ba7499cbc9007e59e40f126c36b81..31e88749ec6e2acd45631564e97eaad6c8a2233e 100644 (file)
@@ -334,15 +334,14 @@ static int sdbox_mailbox_open(struct mailbox *box)
        struct sdbox_mailbox *mbox = SDBOX_MAILBOX(box);
        struct sdbox_index_header hdr;
        bool need_resize;
-       time_t path_ctime;
 
-       if (dbox_mailbox_check_existence(box, &path_ctime) < 0)
+       if (dbox_mailbox_check_existence(box) < 0)
                return -1;
 
        if (sdbox_mailbox_alloc_index(mbox) < 0)
                return -1;
 
-       if (dbox_mailbox_open(box, path_ctime) < 0)
+       if (dbox_mailbox_open(box) < 0)
                return -1;
 
        if (box->creating) {