[dovecot-cvs] dovecot/src/lib-index mail-index-sync-update.c, 1.39,
	1.40
    cras at dovecot.org 
    cras at dovecot.org
       
    Fri Sep  3 23:16:53 EEST 2004
    
    
  
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv28527/lib-index
Modified Files:
	mail-index-sync-update.c 
Log Message:
Don't fail if we can't lock cache file.
Index: mail-index-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-update.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- mail-index-sync-update.c	3 Sep 2004 20:00:49 -0000	1.39
+++ mail-index-sync-update.c	3 Sep 2004 20:16:51 -0000	1.40
@@ -229,6 +229,7 @@
 	struct mail_index_view *view = ctx->view;
 	struct mail_index_record *rec;
 	uint32_t seq;
+	int ret;
 
 	if (mail_index_lookup_uid_range(view, u->uid, u->uid, &seq, &seq) < 0)
 		return -1;
@@ -242,8 +243,8 @@
 	if (rec->cache_offset != 0 && ctx->update_cache) {
 		/* we'll need to link the old and new cache records */
 		if (!ctx->cache_locked) {
-			if (mail_cache_lock(view->index->cache) <= 0)
-				return -1;
+			if ((ret = mail_cache_lock(view->index->cache)) <= 0)
+				return ret < 0 ? -1 : 1;
 			ctx->cache_locked = TRUE;
 		}
 
    
    
More information about the dovecot-cvs
mailing list