[dovecot-cvs] dovecot/src/lib-storage/index/dbox dbox-file.c, 1.14, 1.15 dbox-keywords.c, 1.7, 1.8 dbox-mail.c, 1.15, 1.16 dbox-save.c, 1.21, 1.22 dbox-storage.c, 1.40, 1.41 dbox-storage.h, 1.19, 1.20 dbox-sync-expunge.c, 1.23, 1.24 dbox-sync-full.c, 1.11, 1.12 dbox-sync.c, 1.25, 1.26 dbox-uidlist.c, 1.47, 1.48
tss at dovecot.org
tss at dovecot.org
Fri Mar 30 15:44:05 EEST 2007
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/cydir cydir-save.c, 1.1, 1.2 cydir-storage.c, 1.1, 1.2 cydir-storage.h, 1.1, 1.2 cydir-sync.c, 1.1, 1.2
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-copy.c, 1.51, 1.52 maildir-keywords.c, 1.15, 1.16 maildir-mail.c, 1.33, 1.34 maildir-save.c, 1.83, 1.84 maildir-storage.c, 1.155, 1.156 maildir-storage.h, 1.66, 1.67 maildir-sync.c, 1.99, 1.100 maildir-uidlist.c, 1.64, 1.65 maildir-util.c, 1.22, 1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/dbox
In directory talvi:/tmp/cvs-serv18163/index/dbox
Modified Files:
dbox-file.c dbox-keywords.c dbox-mail.c dbox-save.c
dbox-storage.c dbox-storage.h dbox-sync-expunge.c
dbox-sync-full.c dbox-sync.c dbox-uidlist.c
Log Message:
Removed struct index_storage abstraction. It's pointless.
Index: dbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-file.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- dbox-file.c 29 Mar 2007 07:59:17 -0000 1.14
+++ dbox-file.c 30 Mar 2007 12:44:03 -0000 1.15
@@ -73,7 +73,7 @@
return 0;
errno = file->input->stream_errno;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"read(%s) failed: %m", file->path);
return -1;
}
@@ -93,7 +93,7 @@
if (memcmp(hdr->magic, DBOX_MAIL_HEADER_MAGIC,
sizeof(hdr->magic)) != 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"Corrupted mail header at %"PRIuUOFF_T
" in dbox file %s", offset, file->path);
return -1;
@@ -126,7 +126,7 @@
if (mbox->file->fd == -1) {
if (errno == ENOENT)
return 0;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"open(%s) failed: %m", mbox->file->path);
return -1;
}
@@ -233,7 +233,7 @@
file->mail_header_size < sizeof(struct dbox_mail_header) ||
file->keyword_count > file->mail_header_size -
sizeof(struct dbox_mail_header)) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"dbox %s: broken file header", file->path);
return -1;
}
@@ -256,12 +256,12 @@
if (size < sizeof(hdr)) {
if (file->input->stream_errno != 0) {
errno = file->input->stream_errno;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"read(%s) failed: %m", file->path);
return -1;
}
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"dbox %s: unexpected end of file", file->path);
return -1;
}
@@ -292,7 +292,7 @@
/* write header + LF to mark end-of-keywords list */
if (o_stream_send(file->output, &hdr, sizeof(hdr)) < 0 ||
o_stream_send_str(file->output, "\n") < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"write(%s) failed: %m", file->path);
return -1;
}
@@ -304,7 +304,7 @@
file->output->offset);
if (o_stream_send(file->output, buf, size) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"write(%s) failed: %m", file->path);
return -1;
}
Index: dbox-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-keywords.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- dbox-keywords.c 15 Mar 2007 17:02:16 -0000 1.7
+++ dbox-keywords.c 30 Mar 2007 12:44:03 -0000 1.8
@@ -75,7 +75,7 @@
if (line == NULL || file->input->v_offset > file->header_size) {
/* unexpected end of list, or list continues outside its
allocated area */
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"Corrupted keyword list offset in dbox file %s",
file->path);
array_clear(&file->idx_file_keywords);
@@ -200,7 +200,7 @@
if (pwrite_full(file->fd, str_data(keyword_str) + new_pos,
str_len(keyword_str) - new_pos,
file->keyword_list_offset + new_pos) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"pwrite_full(%s) failed: %m", file->path);
}
Index: dbox-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-mail.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- dbox-mail.c 15 Oct 2006 10:36:27 -0000 1.15
+++ dbox-mail.c 30 Mar 2007 12:44:03 -0000 1.16
@@ -23,7 +23,7 @@
uint32_t hdr_uid = hex2dec(hdr->uid_hex, sizeof(hdr->uid_hex));
if (hdr_uid != mail->mail.mail.uid) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"dbox %s: Cached file offset broken",
mbox->file->path);
@@ -68,7 +68,7 @@
return -1;
}
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"Cached message offset lost for uid %u in "
"dbox %s", uid, mbox->path);
@@ -135,7 +135,7 @@
prev_offset = *offset_r;
}
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"Cached message offset (%u, %"PRIuUOFF_T") "
"broken for uid %u in dbox %s",
file_seq, *offset_r, mail->mail.mail.uid,
Index: dbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-save.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- dbox-save.c 23 Mar 2007 20:46:20 -0000 1.21
+++ dbox-save.c 30 Mar 2007 12:44:03 -0000 1.22
@@ -258,10 +258,10 @@
if (o_stream_send_istream(ctx->file->output, ctx->input) < 0) {
if (ENOSPACE(ctx->file->output->stream_errno)) {
- mail_storage_set_error(STORAGE(ctx->mbox->storage),
+ mail_storage_set_error(&ctx->mbox->storage->storage,
"Not enough disk space");
} else {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"o_stream_send_istream(%s) failed: %m",
ctx->file->path);
}
@@ -284,7 +284,7 @@
file to the size before writing. */
if (ftruncate(ctx->file->fd, ctx->failed ? ctx->hdr_offset :
ctx->file->output->offset) < 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"ftruncate(%s) failed: %m",
ctx->file->path);
ctx->failed = TRUE;
@@ -300,7 +300,7 @@
sizeof(hdr.mail_size_hex), ctx->hdr_offset +
offsetof(struct dbox_mail_header,
mail_size_hex)) < 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"pwrite_full(%s) failed: %m",
ctx->file->path);
ctx->failed = TRUE;
@@ -360,7 +360,7 @@
sizeof(hdr.uid_hex), offset +
offsetof(struct dbox_mail_header,
uid_hex)) < 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"pwrite_full(%s) failed: %m",
file->path);
ctx->failed = TRUE;
Index: dbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-storage.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- dbox-storage.c 29 Mar 2007 11:51:26 -0000 1.40
+++ dbox-storage.c 30 Mar 2007 12:44:03 -0000 1.41
@@ -168,7 +168,6 @@
enum file_lock_method lock_method)
{
struct dbox_storage *storage;
- struct index_storage *istorage;
struct mailbox_list_settings list_set;
struct mailbox_list *list;
const char *error;
@@ -224,22 +223,18 @@
storage->new_file_dotlock_set.use_excl_lock = TRUE;
}
- istorage = INDEX_STORAGE(storage);
- istorage->storage = dbox_storage;
- istorage->storage.pool = pool;
-
- istorage->user = p_strdup(pool, user);
- index_storage_init(istorage, list, flags, lock_method);
+ storage->storage = dbox_storage;
+ storage->storage.pool = pool;
+ storage->storage.user = p_strdup(pool, user);
+ index_storage_init(&storage->storage, list, flags, lock_method);
- return STORAGE(storage);
+ return &storage->storage;
}
-static void dbox_free(struct mail_storage *_storage)
+static void dbox_free(struct mail_storage *storage)
{
- struct index_storage *storage = (struct index_storage *) _storage;
-
index_storage_deinit(storage);
- pool_unref(storage->storage.pool);
+ pool_unref(storage->pool);
}
static bool dbox_autodetect(const char *data, enum mail_storage_flags flags)
@@ -317,8 +312,7 @@
dbox_open(struct dbox_storage *storage, const char *name,
enum mailbox_open_flags flags)
{
- struct index_storage *istorage = INDEX_STORAGE(storage);
- struct mail_storage *_storage = STORAGE(storage);
+ struct mail_storage *_storage = &storage->storage;
struct dbox_mailbox *mbox;
struct mail_index *index;
const char *path, *index_dir, *value;
@@ -340,7 +334,7 @@
mbox = p_new(pool, struct dbox_mailbox, 1);
mbox->ibox.box = dbox_mailbox;
mbox->ibox.box.pool = pool;
- mbox->ibox.storage = istorage;
+ mbox->ibox.storage = &storage->storage;
mbox->ibox.mail_vfuncs = &dbox_mail_vfuncs;
mbox->ibox.is_recent = dbox_is_recent;
mbox->ibox.index = index;
Index: dbox-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-storage.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- dbox-storage.h 29 Mar 2007 11:51:26 -0000 1.19
+++ dbox-storage.h 30 Mar 2007 12:44:03 -0000 1.20
@@ -14,7 +14,7 @@
struct dbox_uidlist;
struct dbox_storage {
- struct index_storage storage;
+ struct mail_storage storage;
union mailbox_list_module_context list_module_ctx;
struct dotlock_settings uidlist_dotlock_set;
Index: dbox-sync-expunge.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync-expunge.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- dbox-sync-expunge.c 29 Mar 2007 07:59:18 -0000 1.23
+++ dbox-sync-expunge.c 30 Mar 2007 12:44:03 -0000 1.24
@@ -64,7 +64,7 @@
uoff_t orig_offset)
{
struct dbox_mailbox *mbox = ctx->mbox;
- struct mail_storage *storage = STORAGE(mbox->storage);
+ struct mail_storage *storage = &mbox->storage->storage;
struct dotlock *dotlock;
struct istream *input;
struct ostream *output;
@@ -354,7 +354,7 @@
path = t_strdup_printf("%s/"DBOX_MAIL_FILE_FORMAT,
mbox->path, entry->file_seq);
if (unlink(path) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"unlink(%s) failed: %m", path);
return -1;
}
@@ -376,13 +376,13 @@
if (pwrite_full(mbox->file->fd, "00000000EFFFFFFF", 16,
offsetof(struct dbox_file_header,
append_offset_hex)) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"pwrite_full(%s) failed: %m", mbox->path);
return -1;
}
if (ftruncate(mbox->file->fd, offset) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"ftruncate(%s) failed: %m", mbox->file->path);
return -1;
}
@@ -393,7 +393,7 @@
offsetof(struct dbox_file_header,
have_expunged_mails)) < 0) {
mail_storage_set_critical(
- STORAGE(mbox->storage),
+ &mbox->storage->storage,
"pwrite_full(%s) failed: %m",
mbox->path);
return -1;
@@ -473,7 +473,7 @@
path, DOTLOCK_CREATE_FLAG_NONBLOCK,
&dotlock);
if (ret < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"file_dotlock_create(%s) failed: %m", path);
return -1;
}
@@ -503,7 +503,7 @@
if (pwrite_full(mbox->file->fd, "1", 1,
offsetof(struct dbox_file_header,
have_expunged_mails)) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"pwrite(%s) failed: %m", mbox->file->path);
return -1;
}
Index: dbox-sync-full.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync-full.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- dbox-sync-full.c 29 Mar 2007 07:59:18 -0000 1.11
+++ dbox-sync-full.c 30 Mar 2007 12:44:03 -0000 1.12
@@ -64,7 +64,7 @@
}
if (seq == 0) {
/* not found. it should have been there. */
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"dbox %s sync: "
"UID %u inserted in the middle of mailbox",
mbox->path, mbox->file->seeked_uid);
@@ -120,7 +120,7 @@
if (ret == 0) {
/* broken file, but without any useful data in it */
if (unlink(mbox->file->path) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"unlink(%s) failed: %m", mbox->file->path);
return -1;
}
@@ -154,7 +154,7 @@
if (ret == 0 && array_count(&entry.uid_list) == 0) {
/* all mails expunged in the file */
if (unlink(mbox->file->path) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"unlink(%s) failed: %m", mbox->file->path);
return -1;
}
@@ -202,7 +202,7 @@
write dbox's index file */
dirp = opendir(mbox->path);
if (dirp == NULL) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"opendir(%s) failed: %m", mbox->path);
return -1;
}
@@ -228,7 +228,7 @@
break;
}
if (closedir(dirp) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"closedir(%s) failed: %m", mbox->path);
ret = -1;
}
Index: dbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-sync.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- dbox-sync.c 10 Dec 2006 13:01:26 -0000 1.25
+++ dbox-sync.c 30 Mar 2007 12:44:03 -0000 1.26
@@ -23,14 +23,14 @@
file_seq_r, offset_r);
if (ret <= 0) {
if (ret == 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"Unexpectedly lost seq %u in "
"dbox %s", seq, ctx->mbox->path);
}
return -1;
}
if (*file_seq_r == 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"Cached message offset lost for seq %u in "
"dbox %s", seq, ctx->mbox->path);
return -1;
@@ -190,7 +190,7 @@
offset + first_flag_offset + start);
if (ret < 0) {
mail_storage_set_critical(
- STORAGE(mbox->storage),
+ &mbox->storage->storage,
"pwrite(%s) failed: %m",
mbox->file->path);
return -1;
@@ -573,7 +573,7 @@
return ret;
if (force) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"dbox_sync_full(%s) didn't work",
mbox->path);
Index: dbox-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/dbox/dbox-uidlist.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- dbox-uidlist.c 29 Mar 2007 07:59:18 -0000 1.47
+++ dbox-uidlist.c 30 Mar 2007 12:44:03 -0000 1.48
@@ -193,7 +193,7 @@
for (i = 0; i < count; i++) {
if (!uidlist_merge(&dest_entry->uid_list, &range[i])) {
mail_storage_set_critical(
- STORAGE(uidlist->mbox->storage),
+ &uidlist->mbox->storage->storage,
"%s: UIDs not ordered (file_seq=%u)",
uidlist->path, src_entry->file_seq);
return FALSE;
@@ -265,7 +265,7 @@
}
if (error != NULL) {
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"%s: Corrupted entry: %s", uidlist->path, error);
t_pop();
return FALSE;
@@ -282,7 +282,7 @@
entry->create_time = entry->create_time * 10 + *line-'0';
if (*line != ' ') {
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"%s: Corrupted entry: Expecting space after timestamp",
uidlist->path);
@@ -300,7 +300,7 @@
static int dbox_uidlist_read(struct dbox_uidlist *uidlist)
{
- struct mail_storage *storage = STORAGE(uidlist->mbox->storage);
+ struct mail_storage *storage = &uidlist->mbox->storage->storage;
const char *line;
unsigned int uid_validity, last_uid, last_file_seq;
struct istream *input;
@@ -438,12 +438,12 @@
uidlist->path, 0, &uidlist->dotlock);
if (uidlist->lock_fd == -1) {
if (errno == EAGAIN) {
- mail_storage_set_error(STORAGE(mbox->storage),
+ mail_storage_set_error(&mbox->storage->storage,
"Timeout while waiting for lock");
- STORAGE(mbox->storage)->temporary_error = TRUE;
+ mbox->storage->storage.temporary_error = TRUE;
return 0;
}
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"file_dotlock_open(%s) failed: %m", uidlist->path);
return -1;
}
@@ -603,7 +603,7 @@
t_pop();
if (output->stream_errno != 0) {
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"write(%s) failed: %m", uidlist->path);
ret = -1;
}
@@ -617,14 +617,14 @@
if (stat(uidlist->path, &st) < 0) {
if (errno != ENOENT) {
mail_storage_set_critical(
- STORAGE(uidlist->mbox->storage),
+ &uidlist->mbox->storage->storage,
"stat(%s) failed: %m", uidlist->path);
return -1;
}
st.st_mtime = 0;
}
if (fstat(uidlist->lock_fd, &st2) < 0) {
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"fstat(%s) failed: %m", lock_path);
return -1;
}
@@ -638,7 +638,7 @@
if (utime(lock_path, &ut) < 0) {
mail_storage_set_critical(
- STORAGE(uidlist->mbox->storage),
+ &uidlist->mbox->storage->storage,
"utime(%s) failed: %m", lock_path);
return -1;
}
@@ -725,7 +725,7 @@
i_assert(ctx->uidlist->lock_fd != -1);
if (fstat(ctx->uidlist->fd, &st) < 0) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"fstat(%s) failed: %m", ctx->uidlist->path);
return -1;
}
@@ -736,7 +736,7 @@
}
if (lseek(ctx->uidlist->fd, 0, SEEK_END) < 0) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"lseek(%s) failed: %m", ctx->uidlist->path);
return -1;
}
@@ -759,7 +759,7 @@
t_pop();
if (output->stream_errno != 0) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"write(%s) failed: %m", ctx->uidlist->path);
ret = -1;
}
@@ -770,7 +770,7 @@
/* grow mtime by one to make sure the last write is noticed */
if (fstat(ctx->uidlist->fd, &st) < 0) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"fstat(%s) failed: %m", ctx->uidlist->path);
return -1;
}
@@ -778,7 +778,7 @@
ut.actime = ioloop_time;
ut.modtime = st.st_mtime + 1;
if (utime(ctx->uidlist->path, &ut) < 0) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"utime(%s) failed: %m", ctx->uidlist->path);
return -1;
}
@@ -791,7 +791,7 @@
static int
dbox_uidlist_write_append_offsets(struct dbox_uidlist_append_ctx *ctx)
{
- struct mail_storage *storage = STORAGE(ctx->uidlist->mbox->storage);
+ struct mail_storage *storage = &ctx->uidlist->mbox->storage->storage;
struct dbox_save_file *const *files;
struct dbox_file_header hdr;
unsigned int i, count;
@@ -894,20 +894,20 @@
since we have it locked */
file->fd = open(file->path, O_RDWR);
if (file->fd == -1) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"open(%s) failed: %m", file->path);
return -1;
}
if (fstat(file->fd, &st) < 0) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"fstat(%s) failed: %m", file->path);
return -1;
}
if (st.st_ino != save_file->ino ||
!CMP_DEV_T(st.st_dev, save_file->dev)) {
- mail_storage_set_critical(STORAGE(ctx->uidlist->mbox->storage),
+ mail_storage_set_critical(&ctx->uidlist->mbox->storage->storage,
"Appended file changed unexpectedly: %s", file->path);
return -1;
}
@@ -952,13 +952,13 @@
entry->file_size = (uoff_t)-1;
return 0;
}
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"open(%s) failed: %m", path);
return -1;
}
if (fstat(fd, st) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"fstat(%s) failed: %m", path);
(void)close(fd);
return -1;
@@ -1006,7 +1006,7 @@
if (stat(path, &st) == 0)
return 0;
if (errno != ENOENT) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"stat(%s) failed: %m", path);
return -1;
}
@@ -1088,7 +1088,7 @@
if (ret < 0)
return -1;
} else if (ret < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"file_dotlock_create(%s) failed: %m",
str_c(path));
return -1;
@@ -1391,7 +1391,7 @@
if (stat(uidlist->path, &st) < 0) {
if (errno != ENOENT) {
mail_storage_set_critical(
- STORAGE(uidlist->mbox->storage),
+ &uidlist->mbox->storage->storage,
"stat(%s) failed: %m", uidlist->path);
return -1;
}
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/index/cydir cydir-save.c, 1.1, 1.2 cydir-storage.c, 1.1, 1.2 cydir-storage.h, 1.1, 1.2 cydir-sync.c, 1.1, 1.2
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-copy.c, 1.51, 1.52 maildir-keywords.c, 1.15, 1.16 maildir-mail.c, 1.33, 1.34 maildir-save.c, 1.83, 1.84 maildir-storage.c, 1.155, 1.156 maildir-storage.h, 1.66, 1.67 maildir-sync.c, 1.99, 1.100 maildir-uidlist.c, 1.64, 1.65 maildir-util.c, 1.22, 1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list