diff src/lib-storage/index/index-storage.c @ 939:24b64302f59c HEAD

index_storage_sync_and_lock() didn't set lock notify function.
author Timo Sirainen <tss@iki.fi>
date Fri, 10 Jan 2003 13:29:24 +0200
parents fd8888f6f037
children 8028c4dcf38f
line wrap: on
line diff
--- a/src/lib-storage/index/index-storage.c	Fri Jan 10 13:22:50 2003 +0200
+++ b/src/lib-storage/index/index-storage.c	Fri Jan 10 13:29:24 2003 +0200
@@ -185,16 +185,20 @@
 	}
 }
 
+void index_storage_init_lock_notify(struct index_mailbox *ibox)
+{
+	ibox->next_lock_notify = time(NULL) + LOCK_NOTIFY_INTERVAL;
+	ibox->index->set_lock_notify_callback(ibox->index, lock_notify, ibox);
+}
+
 int index_storage_lock(struct index_mailbox *ibox,
 		       enum mail_lock_type lock_type)
 {
 	int ret;
 
-	ibox->next_lock_notify = time(NULL) + LOCK_NOTIFY_INTERVAL;
-
 	/* we have to set/reset this every time, because the same index
 	   may be used by multiple IndexMailboxes. */
-	ibox->index->set_lock_notify_callback(ibox->index, lock_notify, ibox);
+        index_storage_init_lock_notify(ibox);
 	ret = ibox->index->set_lock(ibox->index, lock_type);
 	ibox->index->set_lock_notify_callback(ibox->index, NULL, NULL);