In gnome-nettool, one annoying bug while is not critical is visually
distracting is
6750812 [gnome-nettool]Graphic information is inconsistent with text
information in "Ping" tab
Essentially, the last bit of the ping is missing because on Linux, ping
retuens icmp_seq number start at 1
and OpenSolaris starts at 0.
So the fix is to make sure the correct index to the value is found out.
Patch below.
-Ghee
--- gnome-nettool-2.26.0/src/ping.c 2008-12-10 00:38:44.000000000 +0000
-+++
../SUNWgnome-nettool-2.26.0.hacked/gnome-nettool-2.26.0/src/ping.c
2009-03-19 11:46:23.642754000 +0000
-@@ -294,7 +294,11 @@
++++
../SUNWgnome-nettool-2.26.0.hacked/gnome-nettool-2.26.0/src/ping.c
2009-03-27 17:45:30.906813000 +0000
+@@ -93,8 +93,13 @@
+ while (nodeavailable) {
+ gtk_tree_model_get (results, &node,
+ ICMP_SEQ_COLUMN, &seqnumber, -1);
++#if defined(sun)
++ index = seqnumber - rangemin;
++ if (seqnumber >= rangemin) {
++#else
+ index = seqnumber - rangemin - 1;
+ if (seqnumber > rangemin) {
++#endif
+ gtk_tree_model_get (results, &node,
+ SRTT_COLUMN, &srtt_str,
+ -1);
+@@ -193,8 +198,13 @@
+ }
+ draw_centered_text (widget, x, line1h, tmpstr);
+ g_free (tmpstr);
++#if defined(sun)
++ if (index + rangemin <= rangemax) {
++ tmpstr = g_strdup_printf ("%d", index + rangemin);
++#else
+ if (index + rangemin + 1 <= rangemax) {
+ tmpstr = g_strdup_printf ("%d", index + rangemin + 1);
++#endif
+ } else {
+ tmpstr = g_strdup ("-");
+ }
+@@ -294,7 +304,11 @@
program = util_find_program_dialog ("ping", parent);
break;
case IPV6:
@@ -231,7 +259,7 @@
break;
case -1:
-@@ -308,7 +312,7 @@
+@@ -308,7 +322,7 @@
if (count == -1) {
count_string = g_strdup_printf(" ");
} else {
@@ -240,7 +268,7 @@
count_string = g_strdup_printf("%d", count);
#else
count_string = g_strdup_printf(" -c %d ", count);
-@@ -317,7 +321,7 @@
+@@ -317,7 +331,7 @@
if (ip_version == IPV4) {
command =
@@ -249,7 +277,7 @@
g_strdup_printf (PING_PROGRAM_FORMAT, program,
host, count_string);
#else
-@@ -326,7 +330,7 @@
+@@ -326,7 +340,7 @@
#endif
} else {
command =
@@ -260,7 +288,7 @@
#else