aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-11-09 14:52:46 +0000
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-11-09 14:52:46 +0000
commit619f90f4905f3a2489014b29b5ce01b3a0e1b93d (patch)
tree7e42f4d1bf187ef8e0bcf7bccd8a9676c3122c76 /src/fuzzy_storage.c
parent1fbc13099ee4dbabc26be7814258db6b54bd14d4 (diff)
downloadrspamd-619f90f4905f3a2489014b29b5ce01b3a0e1b93d.tar.gz
rspamd-619f90f4905f3a2489014b29b5ce01b3a0e1b93d.zip
[Minor] Simplify
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 5adf54e46..b8ee95c15 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -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 {