diff src/lda/main.c @ 9468:653183a81b6c HEAD

Mailbox opening and closing APIs changed.
author Timo Sirainen <tss@iki.fi>
date Mon, 15 Jun 2009 14:28:55 -0400
parents e374a365521d
children b373de4973cd
line wrap: on
line diff
--- a/src/lda/main.c	Fri Jun 12 12:52:38 2009 -0400
+++ b/src/lda/main.c	Mon Jun 15 14:28:55 2009 -0400
@@ -416,17 +416,17 @@
 		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->list, "Dovecot Delivery Mail",
-				   input, MAILBOX_OPEN_NO_INDEX_FILES);
+		box = mailbox_alloc(raw_ns->list, "Dovecot Delivery Mail",
+				    input, MAILBOX_FLAG_NO_INDEX_FILES);
 		i_stream_unref(&input);
 	} else {
 		mtime = (time_t)-1;
-		box = mailbox_open(raw_ns->list, path, NULL,
-				   MAILBOX_OPEN_NO_INDEX_FILES);
+		box = mailbox_alloc(raw_ns->list, path, NULL,
+				    MAILBOX_FLAG_NO_INDEX_FILES);
 	}
-	if (box == NULL) {
+	if (mailbox_open(box) < 0) {
 		i_fatal("Can't open delivery mail as raw: %s",
-			mailbox_list_get_last_error(raw_ns->list, &error));
+			mail_storage_get_last_error(box->storage, &error));
 	}
 	if (mailbox_sync(box, 0, 0, NULL) < 0) {
 		i_fatal("Can't sync delivery mail: %s",