"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib-storage/index/index-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.

index-storage.c  (dovecot-2.3.16):index-storage.c  (dovecot-2.3.17)
skipping to change at line 12 skipping to change at line 12
#include "lib.h" #include "lib.h"
#include "array.h" #include "array.h"
#include "istream.h" #include "istream.h"
#include "ostream.h" #include "ostream.h"
#include "ioloop.h" #include "ioloop.h"
#include "str.h" #include "str.h"
#include "str-sanitize.h" #include "str-sanitize.h"
#include "mkdir-parents.h" #include "mkdir-parents.h"
#include "dict.h" #include "dict.h"
#include "fs-api.h"
#include "message-header-parser.h"
#include "mail-index-alloc-cache.h" #include "mail-index-alloc-cache.h"
#include "mail-index-private.h" #include "mail-index-private.h"
#include "mail-index-modseq.h" #include "mail-index-modseq.h"
#include "mailbox-log.h" #include "mailbox-log.h"
#include "mailbox-list-private.h" #include "mailbox-list-private.h"
#include "mail-search-build.h" #include "mail-search-build.h"
#include "index-storage.h" #include "index-storage.h"
#include "index-mail.h" #include "index-mail.h"
#include "index-attachment.h" #include "index-attachment.h"
#include "index-thread-private.h" #include "index-thread-private.h"
skipping to change at line 51 skipping to change at line 53
if (fields == NULL || *fields == '\0') if (fields == NULL || *fields == '\0')
return; return;
for (arr = t_strsplit_spaces(fields, " ,"); *arr != NULL; arr++) { for (arr = t_strsplit_spaces(fields, " ,"); *arr != NULL; arr++) {
const char *name = *arr; const char *name = *arr;
idx = mail_cache_register_lookup(cache, name); idx = mail_cache_register_lookup(cache, name);
if (idx != UINT_MAX) { if (idx != UINT_MAX) {
field = *mail_cache_register_get_field(cache, idx); field = *mail_cache_register_get_field(cache, idx);
} else if (strncasecmp(name, "hdr.", 4) == 0) { } else if (strncasecmp(name, "hdr.", 4) == 0) {
i_zero(&field); /* Do some sanity checking for the header name. Mainly
field.name = name; to make sure there aren't UTF-8 characters that look
field.type = MAIL_CACHE_FIELD_HEADER; like their ASCII equivalents or are completely
invisible. */
if (message_header_name_is_valid(name+4)) {
i_zero(&field);
field.name = name;
field.type = MAIL_CACHE_FIELD_HEADER;
} else {
i_error("%s: Header name '%s' has invalid charact
er, ignoring",
set, name);
continue;
}
} else { } else {
i_error("%s: Unknown cache field name '%s', ignoring", i_error("%s: Unknown cache field name '%s', ignoring",
set, *arr); set, *arr);
continue; continue;
} }
field.decision = dec; field.decision = dec;
mail_cache_register_fields(cache, &field, 1); mail_cache_register_fields(cache, &field, 1);
} }
} }
skipping to change at line 681 skipping to change at line 693
if (create_parent_dir) if (create_parent_dir)
return 1; return 1;
if (!directory && *box->list->set.mailbox_dir_name == '\0') { if (!directory && *box->list->set.mailbox_dir_name == '\0') {
/* For example: layout=fs, path=~/Maildir/foo /* For example: layout=fs, path=~/Maildir/foo
might itself exist, but does it have the might itself exist, but does it have the
cur|new|tmp subdirs? */ cur|new|tmp subdirs? */
if (mailbox_exists(box, FALSE, &existence) < 0) if (mailbox_exists(box, FALSE, &existence) < 0)
return -1; return -1;
if (existence != MAILBOX_EXISTENCE_SELECT) if (existence != MAILBOX_EXISTENCE_SELECT)
return 1; return 1;
} else if (!box->storage->rebuilding_list_index) {
/* ignore existing location if we are recovering list ind
ex */
mail_storage_set_error(box->storage, MAIL_ERROR_EXISTS,
"Mailbox already exists");
return -1;
} }
mail_storage_set_error(box->storage, MAIL_ERROR_EXISTS,
"Mailbox already exists");
return -1;
} }
if (directory) { if (directory) {
/* we only wanted to create the directory and it's done now */ /* we only wanted to create the directory and it's done now */
return 0; return 0;
} }
/* the caller should still create the mailbox */ /* the caller should still create the mailbox */
return 1; return 1;
} }
skipping to change at line 1117 skipping to change at line 1131
MAILBOX_LOG_RECORD_UNSUBSCRIBE, guid); MAILBOX_LOG_RECORD_UNSUBSCRIBE, guid);
return 0; return 0;
} }
void index_storage_destroy(struct mail_storage *storage) void index_storage_destroy(struct mail_storage *storage)
{ {
if (storage->_shared_attr_dict != NULL) { if (storage->_shared_attr_dict != NULL) {
dict_wait(storage->_shared_attr_dict); dict_wait(storage->_shared_attr_dict);
dict_deinit(&storage->_shared_attr_dict); dict_deinit(&storage->_shared_attr_dict);
} }
fs_unref(&storage->mailboxes_fs);
} }
static void index_storage_expunging_init(struct mailbox *box) static void index_storage_expunging_init(struct mailbox *box)
{ {
struct index_mailbox_context *ibox = INDEX_STORAGE_CONTEXT(box); struct index_mailbox_context *ibox = INDEX_STORAGE_CONTEXT(box);
if (ibox->vsize_update != NULL) if (ibox->vsize_update != NULL)
return; return;
ibox->vsize_update = index_mailbox_vsize_update_init(box); ibox->vsize_update = index_mailbox_vsize_update_init(box);
 End of changes. 5 change blocks. 
6 lines changed or deleted 23 lines changed or added

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