changeset 4306:ce3c09a75b87 HEAD

Using file_dotlock_touch() caused Dovecot to think the dotlock had been modified by someone else.
author Timo Sirainen <tss@iki.fi>
date Thu, 08 Jun 2006 19:39:28 +0300
parents b33e92f80392
children f92485c7bbd7
files src/lib/file-dotlock.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/file-dotlock.c	Thu Jun 08 18:25:26 2006 +0300
+++ b/src/lib/file-dotlock.c	Thu Jun 08 19:39:28 2006 +0300
@@ -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();