diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-05 13:07:31 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-05 13:07:31 +0100 |
commit | 7c5d79db90db646cdaef6430482ad8e7dc530f39 (patch) | |
tree | 8e3e87e3876722366f5841d296bf7938eadbc03c | |
parent | fc0d12749932139effc7656e147d13ff09f6c23c (diff) | |
download | rspamd-7c5d79db90db646cdaef6430482ad8e7dc530f39.tar.gz rspamd-7c5d79db90db646cdaef6430482ad8e7dc530f39.zip |
[Project] Add small workaround for sqlite backend
-rw-r--r-- | src/libserver/fuzzy_backend.c | 9 |
1 files 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, |