- update to 0.80
- mtr now waits for last sent packet (#611739) - fixed crashes in XML format - XML format fixes
This commit is contained in:
parent
3ed6fd9482
commit
261ddf40c2
25
mtr-crash-in-xml-mode.patch
Normal file
25
mtr-crash-in-xml-mode.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 9b5df3b69d2ded1a81627a1619e4ce03ca906367 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Gorig <jgorig@redhat.com>
|
||||
Date: Mon, 25 Oct 2010 12:53:16 +0200
|
||||
Subject: [PATCH 1/3] Crash in XML mode
|
||||
|
||||
---
|
||||
report.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/report.c b/report.c
|
||||
index 34ea114..49dfcfb 100644
|
||||
--- a/report.c
|
||||
+++ b/report.c
|
||||
@@ -220,7 +220,7 @@ void xml_close(void)
|
||||
printf(" <HUB COUNT=%d HOST=%s>\n", at+1, name);
|
||||
for( i=0; i<MAXFLD; i++ ) {
|
||||
j = fld_index[fld_active[i]];
|
||||
- if (j < 0) continue;
|
||||
+ if (j <= 0) continue;
|
||||
|
||||
strcpy(name, " <%s>");
|
||||
strcat(name, data_fields[j].format);
|
||||
--
|
||||
1.7.3.1
|
||||
|
37
mtr-now-waits-for-last-response.patch
Normal file
37
mtr-now-waits-for-last-response.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From c196de71466b475192fb4c1910fbcaf91ba36ae7 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Gorig <jgorig@redhat.com>
|
||||
Date: Tue, 26 Oct 2010 10:02:45 +0200
|
||||
Subject: [PATCH 3/3] mtr now waits for last response
|
||||
|
||||
---
|
||||
select.c | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/select.c b/select.c
|
||||
index a53017f..d8e460f 100644
|
||||
--- a/select.c
|
||||
+++ b/select.c
|
||||
@@ -50,6 +50,7 @@ void select_loop(void) {
|
||||
int dnsfd, netfd;
|
||||
int NumPing = 0;
|
||||
int paused = 0;
|
||||
+ int quit = 0;
|
||||
struct timeval lasttime, thistime, selecttime;
|
||||
int dt;
|
||||
int rv;
|
||||
@@ -97,9 +98,10 @@ void select_loop(void) {
|
||||
(thistime.tv_sec == lasttime.tv_sec + intervaltime.tv_sec &&
|
||||
thistime.tv_usec >= lasttime.tv_usec + intervaltime.tv_usec)) {
|
||||
lasttime = thistime;
|
||||
+ if(quit == 1) return;
|
||||
if(NumPing >= MaxPing && (!Interactive || ForceMaxPing))
|
||||
- return;
|
||||
- if (net_send_batch())
|
||||
+ quit = 1;
|
||||
+ else if (net_send_batch())
|
||||
NumPing++;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.3.1
|
||||
|
52
mtr-xml-format-fixes.patch
Normal file
52
mtr-xml-format-fixes.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 9932c19ce5f5c66fca3b1e2cab42348e3babcda6 Mon Sep 17 00:00:00 2001
|
||||
From: Jan Gorig <jgorig@redhat.com>
|
||||
Date: Mon, 25 Oct 2010 12:56:13 +0200
|
||||
Subject: [PATCH 2/3] XML format fixes
|
||||
|
||||
---
|
||||
report.c | 16 ++++++++--------
|
||||
1 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/report.c b/report.c
|
||||
index 49dfcfb..4c67358 100644
|
||||
--- a/report.c
|
||||
+++ b/report.c
|
||||
@@ -185,19 +185,19 @@ void xml_close(void)
|
||||
char name[81];
|
||||
struct hostent *host;
|
||||
|
||||
- printf("<MTR SRC=%s DST=%s", LocalHostname, Hostname);
|
||||
- printf(" TOS=0x%X", tos);
|
||||
+ printf("<MTR SRC=\"%s\" DST=\"%s\"", LocalHostname, Hostname);
|
||||
+ printf(" TOS=\"0x%X\"", tos);
|
||||
if(cpacketsize >= 0) {
|
||||
- printf(" PSIZE=%d", cpacketsize);
|
||||
+ printf(" PSIZE=\"%d\"", cpacketsize);
|
||||
} else {
|
||||
- printf(" PSIZE=rand(%d-%d)",MINPACKET, -cpacketsize);
|
||||
+ printf(" PSIZE=\"rand(%d-%d)\"",MINPACKET, -cpacketsize);
|
||||
}
|
||||
if( bitpattern>=0 ) {
|
||||
- printf(" BITPATTERN=0x%02X", (unsigned char)(bitpattern));
|
||||
+ printf(" BITPATTERN=\"0x%02X\"", (unsigned char)(bitpattern));
|
||||
} else {
|
||||
- printf(" BITPATTERN=rand(0x00-FF)");
|
||||
+ printf(" BITPATTERN=\"rand(0x00-FF)\"");
|
||||
}
|
||||
- printf(" TESTS=%d>\n", MaxPing);
|
||||
+ printf(" TESTS=\"%d\">\n", MaxPing);
|
||||
|
||||
max = net_max();
|
||||
at = net_min();
|
||||
@@ -217,7 +217,7 @@ void xml_close(void)
|
||||
}
|
||||
}
|
||||
|
||||
- printf(" <HUB COUNT=%d HOST=%s>\n", at+1, name);
|
||||
+ printf(" <HUB COUNT=\"%d\" HOST=\"%s\">\n", at+1, name);
|
||||
for( i=0; i<MAXFLD; i++ ) {
|
||||
j = fld_index[fld_active[i]];
|
||||
if (j <= 0) continue;
|
||||
--
|
||||
1.7.3.1
|
||||
|
17
mtr.spec
17
mtr.spec
@ -1,6 +1,6 @@
|
||||
Summary: A network diagnostic tool
|
||||
Name: mtr
|
||||
Version: 0.79
|
||||
Version: 0.80
|
||||
Release: 1%{?dist}
|
||||
Epoch: 2
|
||||
Group: Applications/Internet
|
||||
@ -10,6 +10,11 @@ Source: ftp://ftp.bitwizard.nl/mtr/%{name}-%{version}.tar.gz
|
||||
Source1: xmtr.consolehelper
|
||||
Source2: xmtr.pam
|
||||
Source3: net-x%{name}.desktop
|
||||
|
||||
Patch1: mtr-crash-in-xml-mode.patch
|
||||
Patch2: mtr-xml-format-fixes.patch
|
||||
Patch3: mtr-now-waits-for-last-response.patch
|
||||
|
||||
BuildRequires: ncurses-devel gtk2-devel desktop-file-utils
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -33,6 +38,10 @@ diagnostic tool.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-gtk2
|
||||
make %{?_smp_mflags} && mv mtr xmtr && make distclean
|
||||
@ -82,6 +91,12 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/pixmaps/mtr_icon.xpm
|
||||
|
||||
%changelog
|
||||
* Tue Oct 26 2010 Jan Görig <jgorig redhat com> 2:0.80-1
|
||||
- update to 0.80
|
||||
- mtr now waits for last sent packet (#611739)
|
||||
- fixed crashes in XML format
|
||||
- XML format fixes
|
||||
|
||||
* Mon Jun 28 2010 Adam Tkac <atkac redhat com> 2:0.79-1
|
||||
- update to 0.79
|
||||
- patches merged
|
||||
|
Loading…
Reference in New Issue
Block a user