commit e5c5a3a87d4e3d9ada34adf37248f5ac83b02968 Author: Adam Osuchowski <ad...@pld-linux.org> Date: Sat Oct 23 01:38:12 2021 +0200
- fix ASN printing mtr-asn_print_fix.patch | 21 +++++++++++++++++++++ mtr.spec | 2 ++ 2 files changed, 23 insertions(+) --- diff --git a/mtr.spec b/mtr.spec index 5bec156..4cf8e8d 100644 --- a/mtr.spec +++ b/mtr.spec @@ -28,6 +28,7 @@ Patch3: %{name}-curses-clear_colors.patch Patch4: %{name}-completion.patch # https://github.com/TomHetmer/mtr/commit/19a1fbaf4efc232c4f4a29067297cf5c93fb2794.diff Patch5: %{name}-sourceaddr_ipv4.patch +Patch6: %{name}-asn_print_fix.patch URL: http://www.bitwizard.nl/mtr/ BuildRequires: autoconf >= 2.59 BuildRequires: automake >= 1:1.7.9 @@ -162,6 +163,7 @@ Pakiet ten dostarcza bashowe uzupełnianie parametrów polecenia mtr. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 echo %{version} > .tarball-version diff --git a/mtr-asn_print_fix.patch b/mtr-asn_print_fix.patch new file mode 100644 index 0000000..27ad8cb --- /dev/null +++ b/mtr-asn_print_fix.patch @@ -0,0 +1,21 @@ +diff -ruNp mtr-0.93.orig/ui/asn.c mtr-0.93/ui/asn.c +--- mtr-0.93.orig/ui/asn.c 2019-08-03 10:31:26.000000000 +0200 ++++ mtr-0.93/ui/asn.c 2021-10-23 01:31:30.733932177 +0200 +@@ -193,6 +193,8 @@ static char *split_txtrec( + if (i > ctl->ipinfo_max) + ctl->ipinfo_max = i; + if (ctl->ipinfo_no >= i) { ++ if (ctl->ipinfo_no >= ctl->ipinfo_max) ++ ctl->ipinfo_no = 0; + return (*items)[0]; + } else + return (*items)[ctl->ipinfo_no]; +@@ -307,7 +309,7 @@ char *fmt_ipinfo( + int is_printii( + struct mtr_ctl *ctl) + { +- return (ctl->ipinfo_no >= 0); ++ return ((ctl->ipinfo_no >= 0) && (ctl->ipinfo_no != ctl->ipinfo_max)); + } + + void asn_open( ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/mtr.git/commitdiff/e5c5a3a87d4e3d9ada34adf37248f5ac83b02968 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit