summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 115b04b)
raw | patch | inline | side by side (parent: 115b04b)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 17 Jul 2009 07:39:35 +0000 (09:39 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 17 Jul 2009 07:39:35 +0000 (09:39 +0200) |
Instead, reset the value of all host object in ping_receive_all().
ping_receive_one() does not necessarily get a pointer to the host object for
which we receive a reply, since ICMP messages may be received on _any_ raw
socket.
ping_receive_one() does not necessarily get a pointer to the host object for
which we receive a reply, since ICMP messages may be received on _any_ raw
socket.
src/liboping.c | patch | blob | history |
diff --git a/src/liboping.c b/src/liboping.c
index 51071ada56a603164ca4a3a0e002cc6b79a4554a..2ccbf4d73106ca94f4e57cfdcfa5b5800c333951 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
/* Iterate over all auxiliary data in msghdr */
recv_ttl = -1;
- ph->recv_ttl = -1;
for (cmsg = CMSG_FIRSTHDR (&msghdr); /* {{{ */
cmsg != NULL;
cmsg = CMSG_NXTHDR (&msghdr, cmsg))
ret = 0;
for (ptr = ph; ptr != NULL; ptr = ptr->next)
- ptr->latency = -1.0;
+ {
+ ptr->latency = -1.0;
+ ptr->recv_ttl = -1;
+ }
if (gettimeofday (&nowtime, NULL) == -1)
{