aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fuzzy_storage.c3
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);