dovecot: Don't use ioloop_time. Fixes squat-test which doesn't c...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jan 14 06:53:01 EET 2008
details: http://hg.dovecot.org/dovecot/rev/2de2058a5cdc
changeset: 7159:2de2058a5cdc
user: Timo Sirainen <tss at iki.fi>
date: Mon Jan 14 06:52:37 2008 +0200
description:
Don't use ioloop_time. Fixes squat-test which doesn't create ioloop.
diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
src/plugins/fts-squat/squat-trie.c | 6 ++++--
diffs (31 lines):
diff -r f41bd3065ec8 -r 2de2058a5cdc src/plugins/fts-squat/squat-trie.c
--- a/src/plugins/fts-squat/squat-trie.c Mon Jan 14 06:52:18 2008 +0200
+++ b/src/plugins/fts-squat/squat-trie.c Mon Jan 14 06:52:37 2008 +0200
@@ -178,7 +178,7 @@ static void squat_trie_header_init(struc
{
memset(&trie->hdr, 0, sizeof(trie->hdr));
trie->hdr.version = SQUAT_TRIE_VERSION;
- trie->hdr.indexid = ioloop_time;
+ trie->hdr.indexid = time(NULL);
trie->hdr.uidvalidity = trie->uidvalidity;
trie->hdr.partial_len = DEFAULT_PARTIAL_LEN;
trie->hdr.full_len = DEFAULT_FULL_LEN;
@@ -1087,6 +1087,7 @@ squat_trie_renumber_uidlists(struct squa
struct squat_uidlist_rebuild_context *rebuild_ctx;
ARRAY_TYPE(uint32_t) uids;
uint32_t new_uid_list_idx, max_count=0;
+ time_t now;
int ret = 0;
/* FIXME: update indexid */
@@ -1094,8 +1095,9 @@ squat_trie_renumber_uidlists(struct squa
compress, &rebuild_ctx)) <= 0)
return ret;
+ now = time(NULL);
ctx->trie->hdr.indexid =
- I_MAX((unsigned int)ioloop_time, ctx->trie->hdr.indexid + 1);
+ I_MAX((unsigned int)now, ctx->trie->hdr.indexid + 1);
i_array_init(&uids, 1024);
iter = squat_trie_iterate_uidlist_init(ctx->trie);
More information about the dovecot-cvs
mailing list