commit b43b4d4: [Minor] Ignore FUZZY_STAT

Vsevolod Stakhov vsevolod at rspamd.com
Fri May 12 10:07:03 UTC 2023


Author: Vsevolod Stakhov
Date: 2023-05-12 10:38:20 +0100
URL: https://github.com/rspamd/rspamd/commit/b43b4d481f10eefdb330c742624c2e30ab264381

[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);


More information about the Commits mailing list