[prev in list] [next in list] [prev in thread] [next in thread] 

List:       dovecot-cvs
Subject:    [dovecot-cvs] dovecot/src/lib-index mail-cache-sync-update.c, 1.3,
From:       cras () dovecot ! org (cras () dovecot ! org)
Date:       2004-11-29 2:27:51
Message-ID: 20041129002750.10BD1C000DC1 () talvi ! dovecot ! org
[Download RAW message or body]

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

Modified Files:
	mail-cache-sync-update.c 
Log Message:
Don't crash if cache is unusable.



Index: mail-cache-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-cache-sync-update.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mail-cache-sync-update.c	8 Nov 2004 01:21:14 -0000	1.3
+++ mail-cache-sync-update.c	29 Nov 2004 00:27:47 -0000	1.4
@@ -77,6 +77,9 @@
 	if (*cache_offset == 0)
 		return 1;
 
+	if (MAIL_CACHE_IS_UNUSABLE(cache))
+		return 1;
+
 	ret = mail_cache_handler_init(&ctx, cache);
 	*context = ctx;
 	if (ret <= 0)
@@ -110,6 +113,9 @@
 		return 1;
 	}
 
+	if (MAIL_CACHE_IS_UNUSABLE(cache))
+		return 1;
+
 	if (cache->file_cache != NULL) {
 		file_cache_invalidate(cache->file_cache, *new_cache_offset,
 				      (size_t)-1);

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic