[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-view.c, 1.50, 1.51 mail-transaction-log.c, 1.121, 1.122
tss at dovecot.org
tss at dovecot.org
Fri Jan 26 13:58:56 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv15340/lib-index
Modified Files:
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.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- mail-transaction-log-view.c 17 Jan 2007 16:17:42 -0000 1.50
+++ mail-transaction-log-view.c 26 Jan 2007 13:58:52 -0000 1.51
@@ -183,6 +183,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.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- mail-transaction-log.c 17 Jan 2007 18:53:27 -0000 1.121
+++ mail-transaction-log.c 26 Jan 2007 13:58:52 -0000 1.122
@@ -926,6 +926,8 @@
struct stat st;
const char *path;
+ i_assert(log->head != NULL);
+
if (MAIL_TRANSACTION_LOG_FILE_IN_MEMORY(log->head))
return 0;
@@ -939,8 +941,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;
@@ -955,10 +956,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