[dovecot-cvs] dovecot/src/lib-storage mail-storage-private.h, 1.48, 1.49 mail-storage.c, 1.76, 1.77

tss at dovecot.org tss at dovecot.org
Fri Mar 30 21:41:07 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv29641

Modified Files:
	mail-storage-private.h mail-storage.c 
Log Message:
Moved notify settings to struct mailbox. Removed the parameters from
notify_changes(), they're now set before calling it.



Index: mail-storage-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage-private.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- mail-storage-private.h	30 Mar 2007 14:12:48 -0000	1.48
+++ mail-storage-private.h	30 Mar 2007 18:41:05 -0000	1.49
@@ -94,9 +94,7 @@
 			   enum mailbox_status_items status_items,
 			   struct mailbox_status *status_r);
 
-	void (*notify_changes)(struct mailbox *box, unsigned int min_interval,
-			       mailbox_notify_callback_t *callback,
-			       void *context);
+	void (*notify_changes)(struct mailbox *box);
 
 	struct mailbox_transaction_context *
 		(*transaction_begin)(struct mailbox *box,
@@ -167,6 +165,11 @@
 
 	unsigned int transaction_count;
 
+	/* Mailbox notification settings: */
+	unsigned int notify_min_interval;
+	mailbox_notify_callback_t *notify_callback;
+	void *notify_context;
+
 	/* Module-specific contexts. See mail_storage_module_id. */
 	ARRAY_DEFINE(module_contexts, union mailbox_module_context *);
 

Index: mail-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- mail-storage.c	30 Mar 2007 18:31:57 -0000	1.76
+++ mail-storage.c	30 Mar 2007 18:41:05 -0000	1.77
@@ -489,12 +489,17 @@
 void mailbox_notify_changes(struct mailbox *box, unsigned int min_interval,
 			    mailbox_notify_callback_t *callback, void *context)
 {
-	box->v.notify_changes(box, min_interval, callback, context);
+	box->notify_min_interval = min_interval;
+	box->notify_callback = callback;
+	box->notify_context = context;
+
+	box->v.notify_changes(box);
 }
 
 void mailbox_notify_changes_stop(struct mailbox *box)
 {
-	box->v.notify_changes(box, 0, NULL, NULL);
+
+	mailbox_notify_changes(box, 0, NULL, NULL);
 }
 
 struct mail_keywords *



More information about the dovecot-cvs mailing list