]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
time: don't log debug messages from debug logging
authorVictor Julien <vjulien@oisf.net>
Wed, 8 Feb 2023 06:28:07 +0000 (07:28 +0100)
committerVictor Julien <vjulien@oisf.net>
Thu, 9 Feb 2023 16:38:05 +0000 (17:38 +0100)
Bug: #5835.

Fixes: 31793aface58 ("time: Replace struct timeval with scalar value")
src/util-debug.c

index e9cfc6637b5cfdf5dc87b203746afbb62ba22580..80509ae7ca0b2c11058a366b794134af68199576 100644 (file)
@@ -666,7 +666,9 @@ SCError SCLogMessage(const SCLogLevel log_level, const char *file, const unsigne
     }
 
     /* get ts here so we log the same ts to each output */
-    SCTime_t ts = TimeGet();
+    struct timeval tval;
+    gettimeofday(&tval, NULL);
+    SCTime_t ts = SCTIME_FROM_TIMEVAL(&tval);
 
     op_iface_ctx = sc_log_config->op_ifaces;
     while (op_iface_ctx != NULL) {