Skip to content

Commit

Permalink
[Minor] Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Nov 9, 2023
1 parent 1fbc130 commit 619f90f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/fuzzy_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 619f90f

Please sign in to comment.