diff options
author | Bjørn Mork <bjorn@mork.no> | 2015-05-15 10:25:18 +0200 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2015-05-15 10:25:18 +0200 |
commit | b1b227fa5e00d08af047ab9a012211b66c6b0f13 (patch) | |
tree | 5d891e417ab726a2627dccc40586c43f64b87e55 /eperd/ping.c | |
parent | c9c35747c0d20cff54561c0b8fe15813c7a8e0ff (diff) |
ripe-atlas-fw: imported version 46104610
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Diffstat (limited to 'eperd/ping.c')
-rw-r--r-- | eperd/ping.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); } |