[dovecot-cvs] dovecot/src/lib file-dotlock.c,1.14,1.15

cras at procontrol.fi cras at procontrol.fi
Sun Jun 20 14:46:12 EEST 2004


Update of /home/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv10877/lib

Modified Files:
	file-dotlock.c 
Log Message:
Never overflow secs_left for stale timeout callback



Index: file-dotlock.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- file-dotlock.c	29 May 2004 21:40:30 -0000	1.14
+++ file-dotlock.c	20 Jun 2004 11:46:10 -0000	1.15
@@ -306,7 +306,8 @@
 			t_push();
 			if (change_secs >= stale_notify_threshold &&
 			    change_secs <= wait_left) {
-				if (!callback(stale_timeout - change_secs,
+				if (!callback(stale_timeout < change_secs ? 0 :
+					      stale_timeout - change_secs,
 					      TRUE, context)) {
 					/* we don't want to override */
 					lock_info.last_change = now;



More information about the dovecot-cvs mailing list