[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-view.c, 1.45.2.4, 1.45.2.5 mail-transaction-log.c, 1.111.2.9, 1.111.2.10
tss at dovecot.org
tss at dovecot.org
Fri Jan 26 13:58:35 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv15336/lib-index
Modified Files:
Tag: branch_1_0
mail-transaction-log-view.c mail-transaction-log.c
Log Message:
Cleanups and minor fixes
Index: mail-transaction-log-view.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log-view.c,v
retrieving revision 1.45.2.4
retrieving revision 1.45.2.5
diff -u -d -r1.45.2.4 -r1.45.2.5
--- mail-transaction-log-view.c 17 Jan 2007 16:17:38 -0000 1.45.2.4
+++ mail-transaction-log-view.c 26 Jan 2007 13:58:31 -0000 1.45.2.5
@@ -184,6 +184,7 @@
if (file == NULL || file->hdr.file_seq != seq) {
if (file == NULL && max_file_seq == (uint32_t)-1) {
/* we just wanted to sync everything */
+ i_assert(max_file_offset == (uoff_t)-1);
max_file_seq = seq-1;
break;
}
Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.111.2.9
retrieving revision 1.111.2.10
diff -u -d -r1.111.2.9 -r1.111.2.10
--- mail-transaction-log.c 17 Jan 2007 18:53:24 -0000 1.111.2.9
+++ mail-transaction-log.c 26 Jan 2007 13:58:31 -0000 1.111.2.10
@@ -932,6 +932,8 @@
struct stat st;
const char *path;
+ i_assert(log->head != NULL);
+
if (MAIL_TRANSACTION_LOG_FILE_IN_MEMORY(log->head))
return 0;
@@ -945,8 +947,7 @@
}
/* log was deleted. just reopen/recreate it. */
} else {
- if (log->head != NULL &&
- log->head->st_ino == st.st_ino &&
+ if (log->head->st_ino == st.st_ino &&
CMP_DEV_T(log->head->st_dev, st.st_dev)) {
/* same file */
return 0;
@@ -961,10 +962,8 @@
i_assert(!file->locked);
- if (log->head != NULL) {
- if (--log->head->refcount == 0)
- mail_transaction_logs_clean(log);
- }
+ if (--log->head->refcount == 0)
+ mail_transaction_logs_clean(log);
log->head = file;
log->head->refcount++;
More information about the dovecot-cvs
mailing list