From 3f0cc2533c21e0ce4c1975eac6146d758275a564 Mon Sep 17 00:00:00 2001 From: Danijel Tasov Date: Mon, 25 Sep 2023 09:49:11 +0200 Subject: Fix compile errors Signed-off-by: Danijel Tasov --- plugins-root/check_icmp.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'plugins-root') diff --git a/plugins-root/check_icmp.c b/plugins-root/check_icmp.c index 18eed74e..d1fe5b11 100644 --- a/plugins-root/check_icmp.c +++ b/plugins-root/check_icmp.c @@ -991,17 +991,17 @@ wait_for_reply(int sock, u_int t) if (jitter_tmp > host->jitter_max) host->jitter_max=jitter_tmp; } - + /* Check if packets in order */ - if (host->last_icmp_seq >= icp.icmp_seq) + if (host->last_icmp_seq >= packet.icp->icmp_seq) host->order_status=STATE_CRITICAL; } host->last_tdiff=tdiff; - - host->last_icmp_seq=icp.icmp_seq; - + + host->last_icmp_seq=packet.icp->icmp_seq; + //printf("%d tdiff %d host->jitter %u host->last_tdiff %u\n", icp.icmp_seq, tdiff, host->jitter, host->last_tdiff); - + host->time_waited += tdiff; host->icmp_recv++; icmp_recv++; @@ -1596,8 +1596,6 @@ add_target_ip(char *arg, struct sockaddr_storage *in) } /* fill out the sockaddr_in struct */ - host->saddr_in.sin_family = AF_INET; - host->saddr_in.sin_addr.s_addr = in->s_addr; host->rtmin = INFINITY; host->rtmax = 0; host->jitter=0; -- cgit v1.2.3-74-g34f1