]> source.dussan.org Git - rspamd.git/commitdiff
[Project] Add small workaround for sqlite backend
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Jul 2018 12:07:31 +0000 (13:07 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 5 Jul 2018 12:07:31 +0000 (13:07 +0100)
src/libserver/fuzzy_backend.c

index b2bf90d99b1aaa915fec40a218fdfb63c80d6640..b66ac49c07c079d3546a3b6689a2d783c1291ca1 100644 (file)
@@ -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,