aboutsummaryrefslogtreecommitdiff
path: root/plugins-root
diff options
context:
space:
mode:
authorGravatar Matthias Eble <psychotrahe@gmx.de> 2009-06-14 23:31:29 +0200
committerGravatar Matthias Eble <psychotrahe@gmx.de> 2009-06-14 23:31:29 +0200
commit5f673084513315690179009e9aad6420e161f030 (patch)
tree184519e2bcbb64ca8872fd5123201e7f5ba0faf1 /plugins-root
parent38e20a1a3369bf470b8ce9b66ca5dfb57302e009 (diff)
downloadmonitoring-plugins-5f673084513315690179009e9aad6420e161f030.tar.gz
Fixed error in rtt/rta calculation in case of system clock problems
Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more. The RTA calculation hopefully gets a more accurate value in these cases also.
Diffstat (limited to 'plugins-root')
-rw-r--r--plugins-root/check_icmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c
index ecf3d08b..cba7c440 100644
--- a/plugins-root/check_icmp.c
+++ b/plugins-root/check_icmp.c
@@ -1035,7 +1035,7 @@ get_timevaldiff(struct timeval *early, struct timeval *later)
if(!early) early = &prog_start;
/* if early > later we return 0 so as to indicate a timeout */
- if(early->tv_sec > early->tv_sec ||
+ if(early->tv_sec > later->tv_sec ||
(early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
{
return 0;