diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-11-21 16:26:36 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-11-21 16:26:36 +0000 |
commit | 69978615370266e53b86d73835fcf7f665b73d6d (patch) | |
tree | 0b936acb9de0d204c5c5ba3c581b975ad2f29354 /src | |
parent | b6eeff716ba8ef4b34b56b5246fa67b31fdaabfc (diff) | |
download | rspamd-69978615370266e53b86d73835fcf7f665b73d6d.tar.gz rspamd-69978615370266e53b86d73835fcf7f665b73d6d.zip |
[Minor] Store approximation
Diffstat (limited to 'src')
-rw-r--r-- | src/fuzzy_storage.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c index 569889660..d42dffdce 100644 --- a/src/fuzzy_storage.c +++ b/src/fuzzy_storage.c @@ -1332,7 +1332,8 @@ rspamd_fuzzy_process_command(struct fuzzy_session *session) } } else if (cmd->cmd == FUZZY_STAT) { - result.v1.prob = 1.0f; + /* Store approximation (if needed) */ + result.v1.prob = session->ctx->stat.fuzzy_hashes; /* Store high qword in value and low qword in flag */ result.v1.value = (gint32) ((guint64) session->ctx->stat.fuzzy_hashes >> 32); result.v1.flag = (guint32) (session->ctx->stat.fuzzy_hashes & G_MAXUINT32); |