]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Simplify
authorVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 9 Nov 2023 14:52:46 +0000 (14:52 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Thu, 9 Nov 2023 14:52:46 +0000 (14:52 +0000)
src/fuzzy_storage.c

index 5adf54e467561647eae6f37a3cf71289732c775c..b8ee95c15de3ad9c87b41298c5ffe000ddfe4f8e 100644 (file)
@@ -1338,14 +1338,8 @@ rspamd_fuzzy_process_command(struct fuzzy_session *session)
                rspamd_fuzzy_make_reply(cmd, &result, session, send_flags);
        }
        else if (cmd->cmd == FUZZY_PING) {
-               /* Obtain milliseconds since midnight */
-               double now = rspamd_get_calendar_ticks();
-               double millis = now - (int64_t) now;
-               now = ((int64_t) now % 86400) + millis;
-
                result.v1.prob = 1.0f;
-               result.v1.flag = now * 1000;
-               result.v1.value = result.v1.flag - cmd->value; /* This is transmitted time from our PoV */
+               result.v1.value = cmd->value;
                rspamd_fuzzy_make_reply(cmd, &result, session, send_flags);
        }
        else {