detect/tag: improve time handling on windows

Bug: #5584.
pull/8042/head
Victor Julien 3 years ago
parent 410acf226f
commit 0977f40d1c

@ -555,7 +555,9 @@ int TagTimeoutCheck(Host *host, struct timeval *tv)
prev = NULL;
while (tmp != NULL) {
if ((tv->tv_sec - tmp->last_ts) <= TAG_MAX_LAST_TIME_SEEN) {
struct timeval last_ts = { .tv_sec = tmp->last_ts, 0 };
struct timeval timeout_at = TimevalWithSeconds(&last_ts, TAG_MAX_LAST_TIME_SEEN);
if (!TimevalEarlier(&timeout_at, tv)) {
prev = tmp;
tmp = tmp->next;
retval = 0;

Loading…
Cancel
Save