Fix running action when reporting_period is higher than uptime 65/251065/1
authorKonrad Kuchciak <k.kuchciak@samsung.com>
Thu, 7 Jan 2021 10:22:11 +0000 (11:22 +0100)
committerKonrad Kuchciak <k.kuchciak@samsung.com>
Thu, 7 Jan 2021 10:23:54 +0000 (11:23 +0100)
Change-Id: Ibeb7e42387ded03736a7d258d0b784f66058362c

src/process.c

index cf6b183..94cd2c3 100644 (file)
@@ -396,7 +396,7 @@ static void _run_action(struct data_source *ds, enum limit_type lt)
 {
     unsigned long long t = time_now();
 
-    if ((ds->reporting_period < 0 && ds->last_report_time == 0) ||
+    if (ds->last_report_time == 0 ||
         (ds->reporting_period >= 0 && t - ds->last_report_time > ds->reporting_period * USEC_PER_SEC)) {
 
         ds->action(ds, lt);