]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
util-time: new function to know if live or offline
authorEric Leblond <eric@regit.org>
Tue, 31 May 2016 12:47:58 +0000 (14:47 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 20 Sep 2016 07:42:15 +0000 (09:42 +0200)
src/util-time.c
src/util-time.h

index f768ac733db0c12b3913c26b277d340e24930f77..40de6b817359c50dbad59649d411ec76b45ecd5c 100644 (file)
@@ -90,6 +90,11 @@ void TimeModeSetOffline (void)
     SCLogDebug("offline time mode enabled");
 }
 
+int TimeModeIsLive(void)
+{
+    return live;
+}
+
 void TimeSetByThread(const int thread_id, const struct timeval *tv)
 {
     if (live == TRUE)
index 350f8bf4407d41ab995ef5f141ee11b81d667e35..6efce2f7b2f4bee9fb1b48515798b1548ea96a66 100644 (file)
@@ -48,6 +48,7 @@ void TimeSetIncrementTime(uint32_t);
 
 void TimeModeSetLive(void);
 void TimeModeSetOffline (void);
+int TimeModeIsLive(void);
 
 struct tm *SCLocalTime(time_t timep, struct tm *result);
 void CreateTimeString (const struct timeval *ts, char *str, size_t size);