Handled SIGFPE when --interval=0 is passed to stats-tool
Use default value of 3 second in that case
---
tools/stats-tool.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/stats-tool.c b/tools/stats-tool.c
index 7d117fd..b076478 100644
--- a/tools/stats-tool.c
+++ b/tools/stats-tool.c
@@ -885,6 +885,11 @@ int main(int argc, char *argv[])
else
start_ts = option_start_ts;
+ if (option_interval == 0) {
+ printf("interval cannot be zero, using the default value\n");
+ option_interval = 3;
+ }
+
if (option_create > 0)
stats_create(data_file, option_create, option_interval,
start_ts, rec);
--
1.7.9.5
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman