aboutsummaryrefslogtreecommitdiffstats
path: root/src/binlog.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-11-30 19:26:06 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-11-30 19:26:06 +0300
commit4dce4df79683f5562d557ef80f8e2a648aacf5e8 (patch)
tree411bbc76c26b974340047d854d51bbc42f331e0e /src/binlog.c
parent569df8dd24eb159b069ca7f5efa6a6ba3336d63d (diff)
downloadrspamd-4dce4df79683f5562d557ef80f8e2a648aacf5e8.tar.gz
rspamd-4dce4df79683f5562d557ef80f8e2a648aacf5e8.zip
* Adopt printf function from nginx for comfortable printing of some data types (fixed strings, pids etc)
* Fix work of http maps (they were broken in some places before) * Fix sync of statfiles (not fully tested yet)
Diffstat (limited to 'src/binlog.c')
-rw-r--r--src/binlog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/binlog.c b/src/binlog.c
index f006cd368..830c650fe 100644
--- a/src/binlog.c
+++ b/src/binlog.c
@@ -253,7 +253,7 @@ write_binlog_tree (struct rspamd_binlog *log, GTree *nodes)
idx->len = g_tree_nnodes (nodes) * sizeof (struct rspamd_binlog_element);
if (lseek (log->fd, log->metaindex->indexes[log->metaindex->last_index], SEEK_SET) == -1) {
unlock_file (log->fd, FALSE);
- msg_info ("binlog_insert: cannot seek in file: %s, error: %s, seek: %ld, op: insert index", log->filename,
+ msg_info ("binlog_insert: cannot seek in file: %s, error: %s, seek: %L, op: insert index", log->filename,
strerror (errno), log->metaindex->indexes[log->metaindex->last_index]);
return FALSE;
}
@@ -456,6 +456,7 @@ binlog_sync (struct rspamd_binlog *log, uint64_t from_rev, uint64_t *from_time,
idx = &idxb->indexes[from_rev % BINLOG_IDX_LEN];
if (is_first && idx->time != *from_time) {
res = FALSE;
+ *from_time = 0;
goto end;
}
else {