"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib-storage/index/maildir/maildir-storage.c" between
dovecot-2.3.16.tar.gz and dovecot-2.3.17.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

maildir-storage.c  (dovecot-2.3.16):maildir-storage.c  (dovecot-2.3.17)
skipping to change at line 524 skipping to change at line 524
} }
i_close_fd(&fd); i_close_fd(&fd);
return 0; return 0;
} }
static int static int
maildir_mailbox_create(struct mailbox *box, const struct mailbox_update *update, maildir_mailbox_create(struct mailbox *box, const struct mailbox_update *update,
bool directory) bool directory)
{ {
const char *root_dir, *shared_path; const char *root_dir, *shared_path;
/* allow physical location to exist when we rebuild list index, this
happens with LAYOUT=INDEX only. */
bool verify = box->storage->rebuilding_list_index;
struct stat st; struct stat st;
int ret; int ret;
if ((ret = index_storage_mailbox_create(box, directory)) <= 0) if ((ret = index_storage_mailbox_create(box, directory)) <= 0)
return ret; return ret;
ret = 0; ret = 0;
/* the maildir is created now. finish the creation as best as we can */ /* the maildir is created now. finish the creation as best as we can */
if (create_maildir_subdirs(box, FALSE) < 0) if (create_maildir_subdirs(box, verify) < 0)
ret = -1; ret = -1;
if (maildir_create_maildirfolder_file(box) < 0) if (maildir_create_maildirfolder_file(box) < 0)
ret = -1; ret = -1;
/* if dovecot-shared exists in the root dir, copy it to newly /* if dovecot-shared exists in the root dir, copy it to newly
created mailboxes */ created mailboxes */
root_dir = mailbox_list_get_root_forced(box->list, root_dir = mailbox_list_get_root_forced(box->list,
MAILBOX_LIST_PATH_TYPE_MAILBOX); MAILBOX_LIST_PATH_TYPE_MAILBOX);
shared_path = t_strconcat(root_dir, "/dovecot-shared", NULL); shared_path = t_strconcat(root_dir, "/dovecot-shared", NULL);
if (stat(shared_path, &st) == 0) { if (stat(shared_path, &st) == 0) {
if (maildir_create_shared(box) < 0) if (maildir_create_shared(box) < 0)
skipping to change at line 582 skipping to change at line 585
if (mbox->keep_lock_to != NULL) { if (mbox->keep_lock_to != NULL) {
maildir_uidlist_unlock(mbox->uidlist); maildir_uidlist_unlock(mbox->uidlist);
timeout_remove(&mbox->keep_lock_to); timeout_remove(&mbox->keep_lock_to);
} }
if (mbox->flags_view != NULL) if (mbox->flags_view != NULL)
mail_index_view_close(&mbox->flags_view); mail_index_view_close(&mbox->flags_view);
if (mbox->keywords != NULL) if (mbox->keywords != NULL)
maildir_keywords_deinit(&mbox->keywords); maildir_keywords_deinit(&mbox->keywords);
maildir_uidlist_deinit(&mbox->uidlist); if (mbox->uidlist != NULL)
maildir_uidlist_deinit(&mbox->uidlist);
index_storage_mailbox_close(box); index_storage_mailbox_close(box);
} }
static void maildir_notify_changes(struct mailbox *box) static void maildir_notify_changes(struct mailbox *box)
{ {
struct maildir_mailbox *mbox = MAILDIR_MAILBOX(box); struct maildir_mailbox *mbox = MAILDIR_MAILBOX(box);
const char *box_path = mailbox_get_path(box); const char *box_path = mailbox_get_path(box);
if (box->notify_callback == NULL) if (box->notify_callback == NULL)
mailbox_watch_remove_all(&mbox->box); mailbox_watch_remove_all(&mbox->box);
skipping to change at line 693 skipping to change at line 697
.v = { .v = {
maildir_get_setting_parser_info, maildir_get_setting_parser_info,
maildir_storage_alloc, maildir_storage_alloc,
maildir_storage_create, maildir_storage_create,
index_storage_destroy, index_storage_destroy,
maildir_storage_add_list, maildir_storage_add_list,
maildir_storage_get_list_settings, maildir_storage_get_list_settings,
maildir_storage_autodetect, maildir_storage_autodetect,
maildir_mailbox_alloc, maildir_mailbox_alloc,
NULL, NULL,
NULL, mail_storage_list_index_rebuild,
} }
}; };
struct mailbox maildir_mailbox = { struct mailbox maildir_mailbox = {
.v = { .v = {
maildir_storage_is_readonly, maildir_storage_is_readonly,
index_storage_mailbox_enable, index_storage_mailbox_enable,
maildir_mailbox_exists, maildir_mailbox_exists,
maildir_mailbox_open, maildir_mailbox_open,
maildir_mailbox_close, maildir_mailbox_close,
 End of changes. 4 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)