From b1b227fa5e00d08af047ab9a012211b66c6b0f13 Mon Sep 17 00:00:00 2001 From: Bjørn Mork Date: Fri, 15 May 2015 10:25:18 +0200 Subject: ripe-atlas-fw: imported version 4610 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bjørn Mork --- eperd/ping.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'eperd/ping.c') diff --git a/eperd/ping.c b/eperd/ping.c index 8a6d2a2..16aa8fe 100644 --- a/eperd/ping.c +++ b/eperd/ping.c @@ -354,7 +354,8 @@ static void ping_cb(int result, int bytes, int psize, pingstate->ttl= ttl; } namebuf1[0]= '\0'; - getnameinfo(&pingstate->loc_sin6, loc_socklen, namebuf1, + getnameinfo((struct sockaddr *)&pingstate->loc_sin6, + loc_socklen, namebuf1, sizeof(namebuf1), NULL, 0, NI_NUMERICHOST); namebuf2[0]= '\0'; getnameinfo(loc_sa, loc_socklen, namebuf2, @@ -560,8 +561,6 @@ static void ping_xmit(struct pingstate *host) int nsent, fd4, fd6, t_errno, r; - host->send_error= 0; - host->got_reply= 0; if (host->sentpkts >= host->maxpkts) { /* Done. */ @@ -1165,6 +1164,9 @@ static void ping_start2(void *state) pingstate->sentpkts= 0; pingstate->cursize= pingstate->maxsize; + pingstate->send_error= 0; + pingstate->got_reply= 0; + ping_xmit(pingstate); } -- cgit v1.2.3