diff src/lda/main.c @ 9434:e374a365521d HEAD

Initial commit for making mail_storage:mailbox_list to be from 1:1 to n:n. This will allow namespaces to share the same storage and a single namespace to have multiple storages (multiple mailbox formats). Neither works currently, and this commit probably breaks some things.
author Timo Sirainen <tss@iki.fi>
date Tue, 02 Jun 2009 22:30:28 -0400
parents e4429faabf59
children 653183a81b6c
line wrap: on
line diff
--- a/src/lda/main.c	Tue Jun 02 17:42:40 2009 -0400
+++ b/src/lda/main.c	Tue Jun 02 22:30:28 2009 -0400
@@ -416,21 +416,21 @@
 		i_fatal("Couldn't create internal raw storage: %s", errstr);
 	if (path == NULL) {
 		input = create_raw_stream(&ctx, 0, &mtime);
-		box = mailbox_open(&raw_ns->storage, "Dovecot Delivery Mail",
+		box = mailbox_open(raw_ns->list, "Dovecot Delivery Mail",
 				   input, MAILBOX_OPEN_NO_INDEX_FILES);
 		i_stream_unref(&input);
 	} else {
 		mtime = (time_t)-1;
-		box = mailbox_open(&raw_ns->storage, path, NULL,
+		box = mailbox_open(raw_ns->list, path, NULL,
 				   MAILBOX_OPEN_NO_INDEX_FILES);
 	}
 	if (box == NULL) {
 		i_fatal("Can't open delivery mail as raw: %s",
-			mail_storage_get_last_error(raw_ns->storage, &error));
+			mailbox_list_get_last_error(raw_ns->list, &error));
 	}
 	if (mailbox_sync(box, 0, 0, NULL) < 0) {
 		i_fatal("Can't sync delivery mail: %s",
-			mail_storage_get_last_error(raw_ns->storage, &error));
+			mail_storage_get_last_error(box->storage, &error));
 	}
 	raw_box = (struct raw_mailbox *)box;
 	raw_box->envelope_sender = ctx.src_envelope_sender != NULL ?