summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a61a5ea)
raw | patch | inline | side by side (parent: a61a5ea)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sat, 6 Jan 2007 06:33:17 +0000 (06:33 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Sat, 6 Jan 2007 06:33:17 +0000 (06:33 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1562 f882894a-f735-0410-b71e-b25c423dba1c
plugins/check_ping.c | patch | blob | history |
diff --git a/plugins/check_ping.c b/plugins/check_ping.c
index a4efc6c1fd5c346944438ca985e2c503009a3c61..eb3a6dbf9642fae6edf47f3fb53c3b13566c1afd 100644 (file)
--- a/plugins/check_ping.c
+++ b/plugins/check_ping.c
if (max_packets == -1)
max_packets = DEFAULT_MAX_PACKETS;
- max_seconds = crta * max_packets;
- /* Round up max_seconds because we use only the int part */
- if (max_seconds != (int)max_seconds)
- max_seconds = (int)max_seconds + 1;
-
+ max_seconds = crta / 1000.0 * max_packets + max_packets;
if (max_seconds > timeout_interval)
timeout_interval = (int)max_seconds;