From: Florian Forster Date: Sun, 16 Jul 2006 14:17:50 +0000 (+0200) Subject: Upgraded liboping to version 0.2.3 X-Git-Tag: collectd-3.11.0~75 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=be7450d5e6e384c1f7ef7628e5ea27e77afbb582;p=collectd.git Upgraded liboping to version 0.2.3 --- 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); }