From be7450d5e6e384c1f7ef7628e5ea27e77afbb582 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 16 Jul 2006 16:17:50 +0200 Subject: [PATCH] Upgraded liboping to version 0.2.3 --- src/liboping/liboping.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/liboping/liboping.c b/src/liboping/liboping.c index debd432f..13bcc920 100644 --- a/src/liboping/liboping.c +++ b/src/liboping/liboping.c @@ -537,7 +537,17 @@ static ssize_t ping_sendto (pingobj_t *obj, pinghost_t *ph, (struct sockaddr *) ph->addr, ph->addrlen); if (ret < 0) + { +#if defined(EHOSTUNREACH) + if (errno == EHOSTUNREACH) + return (0); +#endif +#if defined(ENETUNREACH) + if (errno == ENETUNREACH) + return (0); +#endif ping_set_error (obj, "sendto", strerror (errno)); + } return (ret); } -- 2.30.2