return -1;
}
- if ((cache->index->flags & MAIL_INDEX_OPEN_FLAG_DEBUG) != 0) {
- i_debug("%s: Compressed, file_seq changed %u -> %u, "
- "size=%"PRIuUOFF_T", max_uid=%u", cache->filepath,
- cache->need_compress_file_seq, file_seq,
- file_size, max_uid);
- }
+ e_debug(cache->index->event, "%s: Compressed, file_seq changed %u -> %u, "
+ "size=%"PRIuUOFF_T", max_uid=%u", cache->filepath,
+ cache->need_compress_file_seq, file_seq,
+ file_size, max_uid);
/* once we're sure that the compression was successful,
update the offsets */
index->log_sync_locked = FALSE;
index->flags = flags;
index->readonly = (flags & MAIL_INDEX_OPEN_FLAG_READONLY) != 0;
+ if ((flags & MAIL_INDEX_OPEN_FLAG_DEBUG) != 0)
+ event_set_forced_debug(index->event, TRUE);
+ else
+ event_unset_forced_debug(index->event);
if ((flags & MAIL_INDEX_OPEN_FLAG_NFS_FLUSH) != 0 &&
index->fsync_mode != FSYNC_MODE_ALWAYS)