[dovecot-cvs] dovecot/src/lib-index/mbox mbox-sync.c,1.20,1.21
    cras at procontrol.fi 
    cras at procontrol.fi
       
    Mon Nov  4 11:19:23 EET 2002
    
        - Previous message: [dovecot-cvs] dovecot/src/lib ibuffer-mmap.c,1.9,1.10 ibuffer.c,1.8,1.9 macros.h,1.7,1.8 md5.c,1.4,1.5 obuffer-file.c,1.14,1.15 write-full.c,1.3,1.4
 
        - Next message: [dovecot-cvs] dovecot/src/lib-index mail-index.c,1.68,1.69
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
    
  
Update of /home/cvs/dovecot/src/lib-index/mbox
In directory danu:/tmp/cvs-serv24304
Modified Files:
	mbox-sync.c 
Log Message:
We did a full sync too often.
Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-sync.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- mbox-sync.c	4 Nov 2002 04:47:40 -0000	1.20
+++ mbox-sync.c	4 Nov 2002 09:19:19 -0000	1.21
@@ -38,7 +38,7 @@
 		return 0;
 	}
 
-	return offset;
+	return offset + 1; /* +1 for trailing \n */
 }
 
 static int mbox_lock_and_sync_full(MailIndex *index,
@@ -104,16 +104,18 @@
 
 		index->mbox_size = get_indexed_mbox_size(index);
 		if (index->file_sync_stamp == 0 &&
-		    index->mbox_size == filesize+1) {
+		    index->mbox_size == filesize) {
 			/* just opened the mailbox, and the file size is same
 			   as we expected. don't bother checking it any
-			   further. the +1 comes from the extra \n at end. */
+			   further. */
 		} else {
 			if (changes != NULL)
 				*changes = TRUE;
 
 			if (!mbox_lock_and_sync_full(index, data_lock_type))
 				return FALSE;
+
+			index->mbox_size = filesize;
 		}
 
 		index->file_sync_stamp = st.st_mtime;
    
    
        
	- Previous message: [dovecot-cvs] dovecot/src/lib ibuffer-mmap.c,1.9,1.10 ibuffer.c,1.8,1.9 macros.h,1.7,1.8 md5.c,1.4,1.5 obuffer-file.c,1.14,1.15 write-full.c,1.3,1.4
 
	- Next message: [dovecot-cvs] dovecot/src/lib-index mail-index.c,1.68,1.69
 
         -  Messages sorted by: 
              [ date ]
              [ thread ]
              [ subject ]
              [ author ]
         
 
       
More information about the dovecot-cvs
mailing list