Merge lp:~cyphermox/ubuntu/maverick/gnome-nettool/ping-fix into lp:ubuntu/maverick/gnome-nettool

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Merge reported by: Martin Pitt
Merged at revision: not available
Proposed branch: lp:~cyphermox/ubuntu/maverick/gnome-nettool/ping-fix
Merge into: lp:ubuntu/maverick/gnome-nettool
Diff against target: 99 lines (+79/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/0001-ping-Handle-output-with-icmp_req.patch (+71/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~cyphermox/ubuntu/maverick/gnome-nettool/ping-fix
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Review via email: mp+61471@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2010-08-17 16:44:37 +0000
3+++ debian/changelog 2011-05-18 20:24:30 +0000
4@@ -1,3 +1,10 @@
5+gnome-nettool (2.31.6-0ubuntu1.1) maverick-proposed; urgency=low
6+
7+ * debian/patches/0001-ping-Handle-output-with-icmp_req.patch: fix ping format
8+ parsing so we get back the results in the UI. (LP: #663014)
9+
10+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Wed, 18 May 2011 16:09:45 -0400
11+
12 gnome-nettool (2.31.6-0ubuntu1) maverick; urgency=low
13
14 * New upstream release
15
16=== added file 'debian/patches/0001-ping-Handle-output-with-icmp_req.patch'
17--- debian/patches/0001-ping-Handle-output-with-icmp_req.patch 1970-01-01 00:00:00 +0000
18+++ debian/patches/0001-ping-Handle-output-with-icmp_req.patch 2011-05-18 20:24:30 +0000
19@@ -0,0 +1,71 @@
20+From 9af2e18755725dc47ae8eb2867e3f038c298bc09 Mon Sep 17 00:00:00 2001
21+From: Josselin Mouette <joss@debian.org>
22+Date: Sat, 13 Nov 2010 13:53:12 +0100
23+Subject: [PATCH] [ping] Handle output with icmp_req
24+
25+iputils-ping displays icmp_req= instead of icmp_seq=. Handle the two
26+outputs correctly.
27+---
28+ src/ping.c | 7 ++++---
29+ src/ping.h | 8 ++++----
30+ 2 files changed, 8 insertions(+), 7 deletions(-)
31+
32+diff --git a/src/ping.c b/src/ping.c
33+index 2c973c3..74f3c19 100644
34+--- a/src/ping.c
35++++ b/src/ping.c
36+@@ -405,7 +405,7 @@ ping_foreach_with_tree (Netinfo * netinfo, gchar * line, gint len,
37+
38+ if (len > 0) { /* there are data to show */
39+ count = strip_line (line, &data, netinfo);
40+- if ((count == 5) || (count == 6)) {
41++ if ((count == 5) || (count == 7)) {
42+
43+ /* Creation of GtkTreeView */
44+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW
45+@@ -519,6 +519,7 @@ static gint
46+ strip_line (gchar * line, ping_data * data, Netinfo * netinfo)
47+ {
48+ gint count;
49++ gchar dummy_buf[3];
50+
51+ if (netinfo_get_ip_version (netinfo) == IPV4)
52+ line = g_strdelimit (line, ":", ' ');
53+@@ -530,9 +531,9 @@ strip_line (gchar * line, ping_data * data, Netinfo * netinfo)
54+ &(data)->bytes, data->ip, &(data)->icmp_seq,
55+ data->srtt, data->unit);
56+ #endif
57+-#ifdef PING_PARAMS_6
58++#ifdef PING_PARAMS_7
59+ count = sscanf (line, PING_FORMAT,
60+- &(data)->bytes, data->ip, &(data)->icmp_seq,
61++ &(data)->bytes, data->ip, dummy_buf, &(data)->icmp_seq,
62+ &(data)->ttl, data->srtt, data->unit);
63+ #endif
64+ if (count != 5 && count != 6) {
65+diff --git a/src/ping.h b/src/ping.h
66+index 0d2e068..53dd5de 100644
67+--- a/src/ping.h
68++++ b/src/ping.h
69+@@ -28,14 +28,14 @@
70+ /* <path to program> ping -b [-c <count>] -n <host> */
71+ # define PING_PROGRAM_FORMAT "%s ping -b%s-n %s"
72+ # define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
73+-# define PING_FORMAT "%d bytes from %s icmp_seq=%d ttl=%d time=%s %s"
74+-# define PING_PARAMS_6
75++# define PING_FORMAT "%d bytes from %s icmp_%3c=%d ttl=%d time=%s %s"
76++# define PING_PARAMS_7
77+ #elif defined(__OSF__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
78+ /* <path to program> ping [-c <count>] -n <host> */
79+ # define PING_PROGRAM_FORMAT "%s ping%s-n %s"
80+ # define PING_PROGRAM_FORMAT_6 "%s ping6%s-n %s"
81+-# define PING_FORMAT "%d bytes from %s icmp_seq=%d ttl=%d time=%s %s"
82+-# define PING_PARAMS_6
83++# define PING_FORMAT "%d bytes from %s icmp_%3c=%d ttl=%d time=%s %s"
84++# define PING_PARAMS_7
85+ #elif defined(__sun__)
86+ /* <path to program> ping -s -n <host> [<count>] */
87+ # define PING_PROGRAM_FORMAT "%s ping -s -n %s 56%s"
88+--
89+1.7.2.3
90+
91
92=== modified file 'debian/patches/series'
93--- debian/patches/series 2010-06-07 14:24:05 +0000
94+++ debian/patches/series 2011-05-18 20:24:30 +0000
95@@ -2,3 +2,4 @@
96 02_lpi.patch
97 03_use_tracepath.patch
98 04_menu_change.patch
99+0001-ping-Handle-output-with-icmp_req.patch

Subscribers

People subscribed via source and target branches