]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Store approximation 4714/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 21 Nov 2023 16:26:36 +0000 (16:26 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 21 Nov 2023 16:26:36 +0000 (16:26 +0000)
src/fuzzy_storage.c

index 569889660e28534a534bd52a4b8ad749fac88ba4..d42dffdce846ea6a2145f4cf6befd2fce0e262a7 100644 (file)
@@ -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);