From b43b4d481f10eefdb330c742624c2e30ab264381 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 12 May 2023 10:38:20 +0100 Subject: [PATCH] [Minor] Ignore FUZZY_STAT --- src/fuzzy_storage.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 8a5b43017..347130c41 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -874,16 +874,18 @@ rspamd_fuzzy_make_reply (struct rspamd_fuzzy_cmd *cmd, session->reply.rep.v1.flag = 0; } - rspamd_fuzzy_update_stats (session->ctx, - session->epoch, - session->reply.rep.v1.prob > 0.5f, - flags & RSPAMD_FUZZY_REPLY_SHINGLE, - flags & RSPAMD_FUZZY_REPLY_DELAY, - session->key, - session->ip_stat, - cmd->cmd, - &session->reply.rep, - session->timestamp); + if (cmd->cmd != FUZZY_STAT && cmd->cmd <= FUZZY_CLIENT_MAX) { + rspamd_fuzzy_update_stats(session->ctx, + session->epoch, + session->reply.rep.v1.prob > 0.5f, + flags & RSPAMD_FUZZY_REPLY_SHINGLE, + flags & RSPAMD_FUZZY_REPLY_DELAY, + session->key, + session->ip_stat, + cmd->cmd, + &session->reply.rep, + session->timestamp); + } } rspamd_fuzzy_write_reply (session); -- 2.39.5