[Nagiosplug-checkins] nagiosplug/plugins check_ping.c,1.55,1.56
Thomas Guyot
dermoth at users.sourceforge.net
Sat Jan 6 07:33:19 CET 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv2992/plugins
Modified Files:
check_ping.c
Log Message:
Revert last patch: it works but not really for the reason I though.
Index: check_ping.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ping.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- check_ping.c 6 Jan 2007 04:52:58 -0000 1.55
+++ check_ping.c 6 Jan 2007 06:33:17 -0000 1.56
@@ -399,11 +399,7 @@
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;
More information about the Commits
mailing list