]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Pull request #3264: latency: disabling time out functionality on implicit enable
authorShanmugam S (shanms) <shanms@cisco.com>
Mon, 14 Feb 2022 15:42:48 +0000 (15:42 +0000)
committerShanmugam S (shanms) <shanms@cisco.com>
Mon, 14 Feb 2022 15:42:48 +0000 (15:42 +0000)
Merge in SNORT/snort3 from ~ABHPAL/snort3:efd to master

Squashed commit of the following:

commit 565c333909f777174211084e247bef41f6ef1389
Author: abhpal <abhpal@cisco.com>
Date:   Wed Feb 9 13:53:11 2022 +0530

    latency: disabling time out on forced enable with disabled config

src/latency/latency_timer.h

index 3dec58b2265256a6ee06a6323317b6d5d9cc33e8..27857bbe6a9b4c95d10480100cd58b0237140bbc 100644 (file)
@@ -37,7 +37,7 @@ public:
     { return sw.get(); }
 
     bool timed_out() const
-    { return elapsed() > max_time; }
+    { return (max_time > CLOCK_ZERO) && (elapsed() > max_time); }
 
 private:
     duration max_time;