[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
tss at dovecot.org
tss at dovecot.org
Fri Mar 30 15:44:06 EEST 2007
- Previous message: [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
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-file.c, 1.19, 1.20 mbox-lock.c, 1.28, 1.29 mbox-mail.c, 1.38, 1.39 mbox-save.c, 1.107, 1.108 mbox-storage.c, 1.172, 1.173 mbox-storage.h, 1.50, 1.51 mbox-sync-rewrite.c, 1.79, 1.80 mbox-sync.c, 1.206, 1.207
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv18163/index/maildir
Modified Files:
maildir-copy.c maildir-keywords.c maildir-mail.c
maildir-save.c maildir-storage.c maildir-storage.h
maildir-sync.c maildir-uidlist.c maildir-util.c
Log Message:
Removed struct index_storage abstraction. It's pointless.
Index: maildir-copy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-copy.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- maildir-copy.c 23 Mar 2007 20:30:11 -0000 1.51
+++ maildir-copy.c 30 Mar 2007 12:44:03 -0000 1.52
@@ -40,7 +40,7 @@
if (stat(path, &st) < 0) {
if (errno == ENOENT)
return 0;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"stat(%s) failed: %m", path);
return -1;
}
@@ -71,7 +71,7 @@
return 0;
if (ENOSPACE(errno)) {
- mail_storage_set_error(STORAGE(mbox->storage),
+ mail_storage_set_error(&mbox->storage->storage,
"Not enough disk space");
return -1;
}
@@ -82,7 +82,7 @@
if (errno == EACCES || ECANTLINK(errno) || errno == EEXIST)
return 1;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"link(%s, %s) failed: %m",
path, str_c(ctx->dest_path));
return -1;
Index: maildir-keywords.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-keywords.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- maildir-keywords.c 14 Feb 2007 18:32:24 -0000 1.15
+++ maildir-keywords.c 30 Mar 2007 12:44:03 -0000 1.16
@@ -61,7 +61,7 @@
strcase_hash, (hash_cmp_callback_t *)strcasecmp);
mk->dotlock_settings.use_excl_lock =
- (STORAGE(mbox->storage)->flags &
+ (mbox->storage->storage.flags &
MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL) != 0;
mk->dotlock_settings.timeout = KEYWORDS_LOCK_STALE_TIMEOUT + 2;
mk->dotlock_settings.stale_timeout = KEYWORDS_LOCK_STALE_TIMEOUT;
@@ -103,7 +103,7 @@
mk->synced = TRUE;
return 0;
}
- mail_storage_set_critical(STORAGE(mk->mbox->storage),
+ mail_storage_set_critical(&mk->mbox->storage->storage,
"stat(%s) failed: %m", mk->path);
return -1;
}
@@ -122,7 +122,7 @@
mk->synced = TRUE;
return 0;
}
- mail_storage_set_critical(STORAGE(mk->mbox->storage),
+ mail_storage_set_critical(&mk->mbox->storage->storage,
"open(%s) failed: %m", mk->path);
return -1;
}
@@ -154,7 +154,7 @@
i_stream_destroy(&input);
if (close(fd) < 0) {
- mail_storage_set_critical(STORAGE(mk->mbox->storage),
+ mail_storage_set_critical(&mk->mbox->storage->storage,
"close(%s) failed: %m", mk->path);
return -1;
}
@@ -270,13 +270,13 @@
str_printfa(str, "%u %s\n", i, keywords[i]);
}
if (write_full(fd, str_data(str), str_len(str)) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"write_full(%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);
return -1;
}
@@ -284,7 +284,7 @@
if (st.st_gid != mbox->mail_create_gid &&
mbox->mail_create_gid != (gid_t)-1) {
if (fchown(fd, (uid_t)-1, mbox->mail_create_gid) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"fchown(%s) failed: %m", path);
}
}
@@ -298,14 +298,14 @@
ut.actime = ioloop_time;
ut.modtime = mk->synced_mtime;
if (utime(path, &ut) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"utime(%s) failed: %m", path);
return -1;
}
}
if (fsync(fd) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"fsync(%s) failed: %m", path);
return -1;
}
@@ -334,7 +334,7 @@
DOTLOCK_CREATE_FLAG_NONBLOCK, &dotlock);
umask(old_mask);
if (fd == -1) {
- mail_storage_set_critical(STORAGE(mk->mbox->storage),
+ mail_storage_set_critical(&mk->mbox->storage->storage,
"file_dotlock_open(%s) failed: %m", mk->path);
return -1;
}
@@ -345,7 +345,7 @@
}
if (file_dotlock_replace(&dotlock, 0) < 0) {
- mail_storage_set_critical(STORAGE(mk->mbox->storage),
+ mail_storage_set_critical(&mk->mbox->storage->storage,
"file_dotlock_replace(%s) failed: %m", mk->path);
return -1;
}
Index: maildir-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-mail.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- maildir-mail.c 29 Mar 2007 12:49:01 -0000 1.33
+++ maildir-mail.c 30 Mar 2007 12:44:03 -0000 1.34
@@ -19,7 +19,7 @@
if (errno == ENOENT)
return 0;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"open(%s) failed: %m", path);
return -1;
}
@@ -32,7 +32,7 @@
if (errno == ENOENT)
return 0;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"stat(%s) failed: %m", path);
return -1;
}
@@ -81,7 +81,7 @@
i_assert(fd != -1);
if (fstat(fd, st) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"fstat(maildir) failed: %m");
return -1;
}
Index: maildir-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-save.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -d -r1.83 -r1.84
--- maildir-save.c 25 Mar 2007 16:26:09 -0000 1.83
+++ maildir-save.c 30 Mar 2007 12:44:03 -0000 1.84
@@ -63,7 +63,7 @@
const char *tmpname, const char *destname,
bool newdir)
{
- struct mail_storage *storage = STORAGE(ctx->mbox->storage);
+ struct mail_storage *storage = &ctx->mbox->storage->storage;
const char *tmp_path, *new_path;
int ret;
@@ -361,7 +361,7 @@
ctx->input = input;
output = o_stream_create_file(ctx->fd, system_pool, 0, FALSE);
- ctx->output = (STORAGE(ctx->mbox->storage)->flags &
+ ctx->output = (ctx->mbox->storage->storage.flags &
MAIL_STORAGE_FLAG_SAVE_CRLF) != 0 ?
o_stream_create_crlf(default_pool, output) :
o_stream_create_lf(default_pool, output);
@@ -390,10 +390,10 @@
if (o_stream_send_istream(ctx->output, ctx->input) < 0) {
if (ENOSPACE(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/%s) failed: %m",
ctx->tmpdir, ctx->file_last->basename);
}
@@ -435,7 +435,7 @@
if (utime(path, &buf) < 0) {
ctx->failed = TRUE;
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"utime(%s) failed: %m", path);
}
}
@@ -445,13 +445,13 @@
if (!ctx->mbox->ibox.fsync_disable) {
if (fsync(ctx->fd) < 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"fsync(%s) failed: %m", path);
ctx->failed = TRUE;
}
}
if (close(ctx->fd) < 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"close(%s) failed: %m", path);
ctx->failed = TRUE;
}
@@ -462,16 +462,16 @@
/* delete the tmp file */
if (unlink(path) < 0 && errno != ENOENT) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"unlink(%s) failed: %m", path);
}
errno = output_errno;
if (ENOSPACE(errno)) {
- mail_storage_set_error(STORAGE(ctx->mbox->storage),
+ mail_storage_set_error(&ctx->mbox->storage->storage,
"Not enough disk space");
} else if (errno != 0) {
- mail_storage_set_critical(STORAGE(ctx->mbox->storage),
+ mail_storage_set_critical(&ctx->mbox->storage->storage,
"write(%s) failed: %m", ctx->mbox->path);
}
Index: maildir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- maildir-storage.c 29 Mar 2007 11:51:27 -0000 1.155
+++ maildir-storage.c 30 Mar 2007 12:44:03 -0000 1.156
@@ -216,7 +216,6 @@
enum file_lock_method lock_method)
{
struct maildir_storage *storage;
- struct index_storage *istorage;
struct mailbox_list_settings list_set;
struct mailbox_list *list;
enum mailbox_open_flags open_flags;
@@ -279,24 +278,20 @@
p_strconcat(pool, "tmp/", storage->temp_prefix, NULL);
}
- istorage = INDEX_STORAGE(storage);
- istorage->storage = maildir_storage;
- istorage->storage.pool = pool;
-
- istorage->user = p_strdup(pool, user);
- index_storage_init(istorage, list, flags, lock_method);
+ storage->storage = maildir_storage;
+ storage->storage.pool = pool;
+ storage->storage.user = p_strdup(pool, user);
+ index_storage_init(&storage->storage, list, flags, lock_method);
open_flags = 0;
- (void)verify_inbox(STORAGE(storage), &open_flags);
- return STORAGE(storage);
+ (void)verify_inbox(&storage->storage, &open_flags);
+ return &storage->storage;
}
-static void maildir_free(struct mail_storage *_storage)
+static void maildir_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 maildir_autodetect(const char *data, enum mail_storage_flags flags)
@@ -469,7 +464,6 @@
maildir_open(struct maildir_storage *storage, const char *name,
enum mailbox_open_flags flags)
{
- struct index_storage *istorage = INDEX_STORAGE(storage);
struct maildir_mailbox *mbox;
struct mail_index *index;
const char *path, *index_dir, *control_dir;
@@ -477,11 +471,11 @@
int shared;
pool_t pool;
- path = mailbox_list_get_path(istorage->storage.list, name,
+ path = mailbox_list_get_path(storage->storage.list, name,
MAILBOX_LIST_PATH_TYPE_MAILBOX);
- index_dir = mailbox_list_get_path(istorage->storage.list, name,
+ index_dir = mailbox_list_get_path(storage->storage.list, name,
MAILBOX_LIST_PATH_TYPE_INDEX);
- control_dir = mailbox_list_get_path(istorage->storage.list, name,
+ control_dir = mailbox_list_get_path(storage->storage.list, name,
MAILBOX_LIST_PATH_TYPE_CONTROL);
if ((flags & MAILBOX_OPEN_NO_INDEX_FILES) != 0)
@@ -500,7 +494,7 @@
mbox = p_new(pool, struct maildir_mailbox, 1);
mbox->ibox.box = maildir_mailbox;
mbox->ibox.box.pool = pool;
- mbox->ibox.storage = istorage;
+ mbox->ibox.storage = &storage->storage;
mbox->ibox.mail_vfuncs = &maildir_mail_vfuncs;
mbox->ibox.is_recent = maildir_is_recent;
mbox->ibox.index = index;
@@ -980,7 +974,7 @@
enum mailbox_info_flags *flags_r)
{
struct maildir_storage *storage = MAILDIR_LIST_CONTEXT(ctx->list);
- struct mail_storage *_storage = &storage->storage.storage;
+ struct mail_storage *_storage = &storage->storage;
int ret;
if (fname[1] == mailbox_list_get_hierarchy_sep(_storage->list) &&
Index: maildir-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- maildir-storage.h 29 Mar 2007 11:51:27 -0000 1.66
+++ maildir-storage.h 30 Mar 2007 12:44:03 -0000 1.67
@@ -46,8 +46,6 @@
#include "mailbox-list-private.h"
#define STORAGE(maildir_storage) \
- (&(maildir_storage)->storage.storage)
-#define INDEX_STORAGE(maildir_storage) \
(&(maildir_storage)->storage)
struct timeval;
@@ -55,7 +53,7 @@
struct maildir_copy_context;
struct maildir_storage {
- struct index_storage storage;
+ struct mail_storage storage;
union mailbox_list_module_context list_module_ctx;
const char *temp_prefix;
Index: maildir-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-sync.c,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- maildir-sync.c 28 Mar 2007 08:08:08 -0000 1.99
+++ maildir-sync.c 30 Mar 2007 12:44:03 -0000 1.100
@@ -406,7 +406,7 @@
if (errno == ENOENT)
return 0;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"unlink(%s) failed: %m", path);
return -1;
}
@@ -474,7 +474,7 @@
return 1;
}
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"rename(%s, %s) failed: %m", path, newpath);
return -1;
}
@@ -736,7 +736,7 @@
old_fname);
} else {
mail_storage_set_critical(
- STORAGE(mbox->storage),
+ &mbox->storage->storage,
"unlink(%s) failed: %m", old_path);
}
}
@@ -750,7 +750,7 @@
if (rename(old_path, new_path) == 0)
i_warning("Fixed a duplicate: %s -> %s", old_fname, new_fname);
else if (errno != ENOENT) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"rename(%s, %s) failed: %m", old_path, new_path);
ret = -1;
}
@@ -761,7 +761,7 @@
static int maildir_scan_dir(struct maildir_sync_context *ctx, bool new_dir)
{
- struct mail_storage *storage = STORAGE(ctx->mbox->storage);
+ struct mail_storage *storage = &ctx->mbox->storage->storage;
const char *dir;
DIR *dirp;
string_t *src, *dest;
@@ -906,14 +906,14 @@
*new_changed_r = *cur_changed_r = FALSE;
if (stat(new_dir, &st) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"stat(%s) failed: %m", new_dir);
return -1;
}
new_mtime = st.st_mtime;
if (stat(cur_dir, &st) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"stat(%s) failed: %m", cur_dir);
return -1;
}
@@ -1072,7 +1072,7 @@
uid_validity != 0 && hdr->uid_validity != 0) {
/* uidvalidity changed and mailbox isn't being initialized,
reset mailbox so we can add all messages as new */
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"Maildir %s sync: UIDVALIDITY changed (%u -> %u)",
mbox->path, hdr->uid_validity, uid_validity);
@@ -1127,7 +1127,7 @@
if ((uflags &
MAILDIR_UIDLIST_REC_FLAG_RACING) != 0) {
mail_storage_set_critical(
- STORAGE(mbox->storage),
+ &mbox->storage->storage,
"Maildir %s sync: "
"UID < next_uid "
"(%u < %u, file = %s)",
@@ -1189,7 +1189,7 @@
}
if ((uflags & MAILDIR_UIDLIST_REC_FLAG_RACING) != 0) {
mail_storage_set_critical(
- STORAGE(mbox->storage),
+ &mbox->storage->storage,
"Maildir %s sync: "
"UID inserted in the middle of mailbox "
"(%u > %u, file = %s)",
Index: maildir-uidlist.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-uidlist.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- maildir-uidlist.c 23 Mar 2007 20:23:24 -0000 1.64
+++ maildir-uidlist.c 30 Mar 2007 12:44:03 -0000 1.65
@@ -102,12 +102,12 @@
umask(old_mask);
if (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", path);
return -1;
}
@@ -115,7 +115,7 @@
if (mbox->mail_create_gid != (gid_t)-1) {
if (fchown(fd, (uid_t)-1, mbox->mail_create_gid) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"fchown(%s) failed: %m", path);
}
}
@@ -166,7 +166,7 @@
db_path = t_strconcat(uidlist->mbox->control_dir,
"/" MAILDIR_UIDLIST_NAME, NULL);
mail_storage_set_critical(
- STORAGE(uidlist->mbox->storage),
+ &uidlist->mbox->storage->storage,
"file_dotlock_replace(%s) failed: %m", db_path);
}
uidlist->delayed_rewrite = FALSE;
@@ -189,7 +189,7 @@
uidlist->next_uid = 1;
uidlist->dotlock_settings.use_excl_lock =
- (STORAGE(mbox->storage)->flags &
+ (mbox->storage->storage.flags &
MAIL_STORAGE_FLAG_DOTLOCK_USE_EXCL) != 0;
uidlist->dotlock_settings.timeout = UIDLIST_LOCK_STALE_TIMEOUT + 2;
uidlist->dotlock_settings.stale_timeout = UIDLIST_LOCK_STALE_TIMEOUT;
@@ -233,12 +233,12 @@
if (uid == 0 || *line != ' ') {
/* invalid file */
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"Invalid data in file %s", uidlist->fname);
return 0;
}
if (uid <= uidlist->prev_read_uid) {
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"UIDs not ordered in file %s (%u > %u)",
uidlist->fname, uid, uidlist->prev_read_uid);
return 0;
@@ -252,7 +252,7 @@
uidlist->last_seen_uid = uid;
if (uid >= uidlist->next_uid) {
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"UID larger than next_uid in file %s (%u >= %u)",
uidlist->fname, uid, uidlist->next_uid);
return 0;
@@ -267,7 +267,7 @@
}
if (hash_lookup_full(uidlist->files, line, NULL, NULL)) {
- mail_storage_set_critical(STORAGE(uidlist->mbox->storage),
+ mail_storage_set_critical(&uidlist->mbox->storage->storage,
"Duplicate file in uidlist file %s: %s",
uidlist->fname, line);
return 0;
@@ -286,7 +286,7 @@
maildir_uidlist_update_read(struct maildir_uidlist *uidlist,
bool *retry_r, bool try_retry)
{
- struct mail_storage *storage = STORAGE(uidlist->mbox->storage);
+ struct mail_storage *storage = &uidlist->mbox->storage->storage;
const char *line;
unsigned int uid_validity, next_uid;
struct istream *input;
@@ -387,7 +387,7 @@
int maildir_uidlist_update(struct maildir_uidlist *uidlist)
{
- struct mail_storage *storage = STORAGE(uidlist->mbox->storage);
+ struct mail_storage *storage = &uidlist->mbox->storage->storage;
struct stat st;
unsigned int i;
bool retry;
@@ -555,7 +555,7 @@
static int maildir_uidlist_rewrite_fd(struct maildir_uidlist *uidlist,
const char *temp_path)
{
- struct mail_storage *storage = STORAGE(uidlist->mbox->storage);
+ struct mail_storage *storage = &uidlist->mbox->storage->storage;
struct maildir_uidlist_iter_ctx *iter;
struct utimbuf ut;
string_t *str;
@@ -661,7 +661,7 @@
"/" MAILDIR_UIDLIST_NAME, NULL);
if (file_dotlock_replace(&uidlist->dotlock, 0) <= 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"file_dotlock_replace(%s) failed: %m", db_path);
(void)unlink(temp_path);
ret = -1;
Index: maildir-util.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-util.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- maildir-util.c 25 Mar 2007 18:24:00 -0000 1.22
+++ maildir-util.c 30 Mar 2007 12:44:03 -0000 1.23
@@ -62,7 +62,7 @@
if (i == 10) {
ret = -1;
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"maildir_file_do(%s) racing", mbox->path);
}
@@ -126,15 +126,15 @@
*fname_r = t_strdup(path);
if (fd == -1) {
if (ENOSPACE(errno)) {
- mail_storage_set_error(STORAGE(mbox->storage),
+ mail_storage_set_error(&mbox->storage->storage,
"Not enough disk space");
} else {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"open(%s) failed: %m", path);
}
} else if (mbox->mail_create_gid != (gid_t)-1) {
if (fchown(fd, (uid_t)-1, mbox->mail_create_gid) < 0) {
- mail_storage_set_critical(STORAGE(mbox->storage),
+ mail_storage_set_critical(&mbox->storage->storage,
"fchown(%s) failed: %m", path);
}
}
- Previous message: [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
- Next message: [dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-file.c, 1.19, 1.20 mbox-lock.c, 1.28, 1.29 mbox-mail.c, 1.38, 1.39 mbox-save.c, 1.107, 1.108 mbox-storage.c, 1.172, 1.173 mbox-storage.h, 1.50, 1.51 mbox-sync-rewrite.c, 1.79, 1.80 mbox-sync.c, 1.206, 1.207
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list