[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c,1.40,1.41

cras at procontrol.fi cras at procontrol.fi
Sun Jun 15 06:20:54 EEST 2003


Update of /home/cvs/dovecot/src/lib-storage/index/maildir
In directory danu:/tmp/cvs-serv11439/lib-storage/index/maildir

Modified Files:
	maildir-storage.c 
Log Message:
Dirty maildir flags support works now.



Index: maildir-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- maildir-storage.c	14 Jun 2003 17:38:06 -0000	1.40
+++ maildir-storage.c	15 Jun 2003 02:20:52 -0000	1.41
@@ -635,6 +635,21 @@
 	}
 }
 
+static int maildir_storage_close(struct mailbox *box)
+{
+	struct index_mailbox *ibox = (struct index_mailbox *) box;
+	int failed = FALSE;
+
+        index_storage_init_lock_notify(ibox);
+	if (!maildir_try_flush_dirty_flags(ibox->index, TRUE)) {
+		mail_storage_set_index_error(ibox);
+		failed = TRUE;
+	}
+	ibox->index->set_lock_notify_callback(ibox->index, NULL, NULL);
+
+	return index_storage_close(box) && !failed;
+}
+
 static void maildir_storage_auto_sync(struct mailbox *box,
 				      enum mailbox_sync_type sync_type,
 				      unsigned int min_newmail_notify_interval)
@@ -688,7 +703,7 @@
 	NULL, /* name */
 	NULL, /* storage */
 
-	index_storage_close,
+	maildir_storage_close,
 	index_storage_get_status,
 	index_storage_sync,
 	maildir_storage_auto_sync,



More information about the dovecot-cvs mailing list