[dovecot-cvs] dovecot/src/lib-index/mbox mbox-lock.c,1.27,1.28

cras at procontrol.fi cras at procontrol.fi
Sun Apr 13 22:01:28 EEST 2003


Update of /home/cvs/dovecot/src/lib-index/mbox
In directory danu:/tmp/cvs-serv8810/lib-index/mbox

Modified Files:
	mbox-lock.c 
Log Message:
Don't crash if there was locking problems when trying to rewrite mbox.



Index: mbox-lock.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mbox/mbox-lock.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- mbox-lock.c	14 Feb 2003 12:56:32 -0000	1.27
+++ mbox-lock.c	13 Apr 2003 18:01:25 -0000	1.28
@@ -217,9 +217,13 @@
 	}
 	ctx->last_stale = stale;
 
-	ctx->index->lock_notify_cb(stale ? MAIL_LOCK_NOTIFY_MAILBOX_OVERRIDE :
-				   MAIL_LOCK_NOTIFY_MAILBOX_ABORT,
-				   secs_left, ctx->index->lock_notify_context);
+	if (ctx->index->lock_notify_cb != NULL) {
+		ctx->index->lock_notify_cb(stale ?
+					   MAIL_LOCK_NOTIFY_MAILBOX_OVERRIDE :
+					   MAIL_LOCK_NOTIFY_MAILBOX_ABORT,
+					   secs_left,
+					   ctx->index->lock_notify_context);
+	}
 	return TRUE;
 }
 




More information about the dovecot-cvs mailing list