"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/plugins/virtual/virtual-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.

virtual-storage.c  (dovecot-2.3.16):virtual-storage.c  (dovecot-2.3.17)
skipping to change at line 278 skipping to change at line 278
mbox->box.pool = pool; mbox->box.pool = pool;
mbox->box.storage = _storage; mbox->box.storage = _storage;
mbox->box.list = list; mbox->box.list = list;
mbox->box.mail_vfuncs = &virtual_mail_vfuncs; mbox->box.mail_vfuncs = &virtual_mail_vfuncs;
mbox->box.virtual_vfuncs = &virtual_mailbox_vfuncs; mbox->box.virtual_vfuncs = &virtual_mailbox_vfuncs;
index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX); index_storage_mailbox_alloc(&mbox->box, vname, flags, MAIL_INDEX_PREFIX);
mbox->storage = storage; mbox->storage = storage;
mbox->virtual_ext_id = (uint32_t)-1; mbox->virtual_ext_id = (uint32_t)-1;
mbox->virtual_ext2_id = (uint32_t)-1;
mbox->virtual_guid_ext_id = (uint32_t)-1; mbox->virtual_guid_ext_id = (uint32_t)-1;
return &mbox->box; return &mbox->box;
} }
void virtual_backend_box_sync_mail_unset(struct virtual_backend_box *bbox) void virtual_backend_box_sync_mail_unset(struct virtual_backend_box *bbox)
{ {
struct mailbox_transaction_context *trans; struct mailbox_transaction_context *trans;
if (bbox->sync_mail != NULL) { if (bbox->sync_mail != NULL) {
trans = bbox->sync_mail->transaction; trans = bbox->sync_mail->transaction;
skipping to change at line 500 skipping to change at line 501
return -1; return -1;
} }
if (!array_is_created(&mbox->backend_boxes)) if (!array_is_created(&mbox->backend_boxes))
ret = virtual_config_read(mbox); ret = virtual_config_read(mbox);
if (ret == 0) { if (ret == 0) {
array_push_back(&mbox->storage->open_stack, &box->name); array_push_back(&mbox->storage->open_stack, &box->name);
ret = virtual_mailboxes_open(mbox, box->flags); ret = virtual_mailboxes_open(mbox, box->flags);
array_pop_back(&mbox->storage->open_stack); array_pop_back(&mbox->storage->open_stack);
} }
if (ret == 0)
ret = index_storage_mailbox_open(box, FALSE);
if (ret < 0) { if (ret < 0) {
virtual_mailbox_close_internal(mbox); virtual_mailbox_close_internal(mbox);
return -1; return -1;
} }
if (index_storage_mailbox_open(box, FALSE) < 0)
return -1;
mbox->virtual_ext_id = mbox->virtual_ext_id =
mail_index_ext_register(mbox->box.index, "virtual", 0, mail_index_ext_register(mbox->box.index, "virtual", 0,
sizeof(struct virtual_mail_index_record), sizeof(struct virtual_mail_index_record),
sizeof(uint32_t)); sizeof(uint32_t));
mbox->virtual_ext2_id =
mail_index_ext_register(mbox->box.index, "virtual2", 0, 0, 0);
mbox->virtual_guid_ext_id = mbox->virtual_guid_ext_id =
mail_index_ext_register(mbox->box.index, "virtual-guid", GUID_128 _SIZE, mail_index_ext_register(mbox->box.index, "virtual-guid", GUID_128 _SIZE,
0, 0); 0, 0);
if (virtual_mailbox_ext_header_read(mbox, box->view, &broken) < 0) { if (virtual_mailbox_ext_header_read(mbox, box->view, &broken) < 0) {
virtual_mailbox_close_internal(mbox); virtual_mailbox_close_internal(mbox);
index_storage_mailbox_close(box); index_storage_mailbox_close(box);
return -1; return -1;
} }
skipping to change at line 877 skipping to change at line 880
static void static void
virtual_list_index_update_sync(struct mailbox *box ATTR_UNUSED, virtual_list_index_update_sync(struct mailbox *box ATTR_UNUSED,
struct mail_index_transaction *trans ATTR_UNUSED, struct mail_index_transaction *trans ATTR_UNUSED,
uint32_t seq ATTR_UNUSED) uint32_t seq ATTR_UNUSED)
{ {
} }
struct mail_storage virtual_storage = { struct mail_storage virtual_storage = {
.name = VIRTUAL_STORAGE_NAME, .name = VIRTUAL_STORAGE_NAME,
.class_flags = MAIL_STORAGE_CLASS_FLAG_NOQUOTA, .class_flags = MAIL_STORAGE_CLASS_FLAG_NOQUOTA |
MAIL_STORAGE_CLASS_FLAG_SECONDARY_INDEX,
.v = { .v = {
NULL, NULL,
virtual_storage_alloc, virtual_storage_alloc,
virtual_storage_create, virtual_storage_create,
index_storage_destroy, index_storage_destroy,
NULL, NULL,
virtual_storage_get_list_settings, virtual_storage_get_list_settings,
NULL, NULL,
virtual_mailbox_alloc, virtual_mailbox_alloc,
 End of changes. 5 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)