[dovecot-cvs] dovecot/src/lib-storage/index index-mailbox-check.c,1.5,1.6 index-storage.h,1.48,1.49

cras at procontrol.fi cras at procontrol.fi
Sun Aug 24 16:58:15 EEST 2003


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

Modified Files:
	index-mailbox-check.c index-storage.h 
Log Message:
IDLE fixes..



Index: index-mailbox-check.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-mailbox-check.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- index-mailbox-check.c	24 Aug 2003 12:45:33 -0000	1.5
+++ index-mailbox-check.c	24 Aug 2003 12:58:13 -0000	1.6
@@ -30,7 +30,8 @@
 
 	if (sync) {
 		ibox->box.sync(&ibox->box, ibox->autosync_flags);
-                ibox->autosync_pending = FALSE;
+		ibox->sync_last_notify = ioloop_time;
+		ibox->autosync_pending = FALSE;
 	}
 }
 
@@ -38,10 +39,11 @@
 {
 	struct index_mailbox *ibox = context;
 
-	if ((unsigned int) (ioloop_time - ibox->sync_last_check) >=
+	ibox->sync_last_check = ioloop_time;
+	if ((unsigned int) (ioloop_time - ibox->sync_last_notify) >=
 	    ibox->min_newmail_notify_interval) {
-		ibox->sync_last_check = ioloop_time;
 		ibox->box.sync(&ibox->box, ibox->autosync_flags);
+		ibox->sync_last_notify = ioloop_time;
                 ibox->autosync_pending = FALSE;
 	} else {
 		ibox->autosync_pending = TRUE;

Index: index-storage.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-storage.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- index-storage.h	24 Aug 2003 12:45:33 -0000	1.48
+++ index-storage.h	24 Aug 2003 12:58:13 -0000	1.49
@@ -33,7 +33,7 @@
 	struct index_autosync_file *autosync_files;
         struct index_autosync_io *autosync_ios;
 	enum mailbox_sync_flags autosync_flags;
-	time_t sync_last_check;
+	time_t sync_last_check, sync_last_notify;
 	unsigned int min_newmail_notify_interval;
 
 	struct index_mail fetch_mail; /* fetch_uid() or fetch_seq() */



More information about the dovecot-cvs mailing list