[dovecot-cvs] dovecot/src/lib-storage/index index-storage.c, 1.75, 1.76

cras at dovecot.org cras at dovecot.org
Fri Apr 29 13:26:10 EEST 2005


Update of /var/lib/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv2513/lib-storage/index

Modified Files:
	index-storage.c 
Log Message:
Don't require notify_ok/notify_no callbacks to be set. Fixes crash in
deliver when mbox locking messages were supposed to be shown.



Index: index-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-storage.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- index-storage.c	26 Apr 2005 18:36:49 -0000	1.75
+++ index-storage.c	29 Apr 2005 10:26:06 -0000	1.76
@@ -265,12 +265,18 @@
 	case MAILBOX_LOCK_NOTIFY_NONE:
 		break;
 	case MAILBOX_LOCK_NOTIFY_MAILBOX_ABORT:
+		if (storage->callbacks->notify_no == NULL)
+			break;
+
 		str = t_strdup_printf("Mailbox is locked, will abort in "
 				      "%u seconds", secs_left);
 		storage->callbacks->notify_no(&ibox->box, str,
 					      storage->callback_context);
 		break;
 	case MAILBOX_LOCK_NOTIFY_MAILBOX_OVERRIDE:
+		if (storage->callbacks->notify_ok == NULL)
+			break;
+
 		str = t_strdup_printf("Stale mailbox lock file detected, "
 				      "will override in %u seconds", secs_left);
 		storage->callbacks->notify_ok(&ibox->box, str,



More information about the dovecot-cvs mailing list