From 7c5d79db90db646cdaef6430482ad8e7dc530f39 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 5 Jul 2018 13:07:31 +0100 Subject: [PATCH] [Project] Add small workaround for sqlite backend --- src/libserver/fuzzy_backend.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libserver/fuzzy_backend.c b/src/libserver/fuzzy_backend.c index b2bf90d99..b66ac49c0 100644 --- a/src/libserver/fuzzy_backend.c +++ b/src/libserver/fuzzy_backend.c @@ -182,12 +182,15 @@ rspamd_fuzzy_backend_update_sqlite (struct rspamd_fuzzy_backend *bk, if (cmd->cmd == FUZZY_WRITE) { rspamd_fuzzy_backend_sqlite_add (sq, ptr); + nupdates ++; } - else { + else if (cmd->cmd == FUZZY_DEL) { rspamd_fuzzy_backend_sqlite_del (sq, ptr); + nupdates ++; + } + else { + /* Do nothing for expire, this backend should no longer be used */ } - - nupdates ++; } if (rspamd_fuzzy_backend_sqlite_finish_update (sq, src, -- 2.39.5