[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.35,1.36

cras at dovecot.org cras at dovecot.org
Thu Jun 8 19:39:30 EEST 2006


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

Modified Files:
	file-dotlock.c 
Log Message:
Using file_dotlock_touch() caused Dovecot to think the dotlock had been
modified by someone else.



Index: file-dotlock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- file-dotlock.c	20 Apr 2006 19:50:45 -0000	1.35
+++ file-dotlock.c	8 Jun 2006 16:39:28 -0000	1.36
@@ -31,7 +31,7 @@
 	char *lock_path;
 	int fd;
 
-	time_t lock_time, lock_update_mtime;
+	time_t lock_time;
 };
 
 struct file_change_info {
@@ -444,7 +444,6 @@
 			dotlock->path = i_strdup(path);
 			dotlock->fd = lock_info.fd;
                         dotlock->lock_time = now;
-                        dotlock->lock_update_mtime = now;
 			lock_info.fd = -1;
 		}
 	}
@@ -673,10 +672,10 @@
 	const char *lock_path;
 	int ret = 0;
 
-	if (dotlock->lock_update_mtime == now)
+	if (dotlock->mtime == now)
 		return 0;
 
-	dotlock->lock_update_mtime = now;
+	dotlock->mtime = now;
 	buf.actime = buf.modtime = now;
 
 	t_push();



More information about the dovecot-cvs mailing list