diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-01-22 10:09:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-01-22 10:09:44 +0000 |
commit | 09351e78166b5e864197c4456ebae3f89dd0bed9 (patch) | |
tree | 41a96399f56ed3aa399006871bfce4430db84aa2 /net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch | |
parent | c8a77dfe4d3d307c1d5dd2650b7297447d8b609d (diff) |
gentoo resync : 22.01.2019
Diffstat (limited to 'net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch')
-rw-r--r-- | net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch b/net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch new file mode 100644 index 000000000000..ba0b13eeab9f --- /dev/null +++ b/net-libs/liboping/files/liboping-1.10.0-do-not-quit-when-ping_send-fail.patch @@ -0,0 +1,53 @@ +From c768cc2270d49247357aa6c527f4c8fe2f81d493 Mon Sep 17 00:00:00 2001 +From: Florian Forster <ff@octo.it> +Date: Thu, 14 Sep 2017 08:35:27 +0200 +Subject: [PATCH] src/oping.c: Don't quit when ping_send() fails. + +It appears that sendto(2) sometimes returns ENOBUFS when the upstream link +is saturated, causing [n]oping to quit. + +Fixes: #28 +--- + src/oping.c | 12 +++--------- + 1 file changed, 3 insertions(+), 9 deletions(-) + +diff --git a/src/oping.c b/src/oping.c +index 36cdf16..c087c80 100644 +--- a/src/oping.c ++++ b/src/oping.c +@@ -2042,7 +2042,6 @@ int main (int argc, char **argv) /* {{{ */ + while (opt_count != 0) + { + int index; +- int status; + + if (gettimeofday (&tv_begin, NULL) < 0) + { +@@ -2050,16 +2049,11 @@ int main (int argc, char **argv) /* {{{ */ + return (1); + } + +- status = ping_send (ping); +- if (status == -EINTR) +- { +- continue; +- } +- else if (status < 0) ++ if (ping_send (ping) < 0) + { + fprintf (stderr, "ping_send failed: %s\n", + ping_get_error (ping)); +- return (1); ++ continue; + } + + index = 0; +@@ -2086,7 +2080,7 @@ int main (int argc, char **argv) /* {{{ */ + time_calc (&ts_wait, &ts_int, &tv_begin, &tv_end); + + /* printf ("Sleeping for %i.%09li seconds\n", (int) ts_wait.tv_sec, ts_wait.tv_nsec); */ +- while ((status = nanosleep (&ts_wait, &ts_wait)) != 0) ++ while (nanosleep (&ts_wait, &ts_wait) != 0) + { + if (errno == EINTR) + { |