Ethereal-dev: [ethereal-dev] [patch] Only enable Follow-TCP Stream on tcp packet selection
Attached ...
Flo
--
Florian Lohoff flo@xxxxxxxxxx +49-5241-470566
... The failure can be random; however, when it does occur, it is
catastrophic and is repeatable ... Cisco Field Notice
Index: file.c
===================================================================
RCS file: /cvsroot/ethereal/file.c,v
retrieving revision 1.129
diff -u -r1.129 file.c
--- file.c 1999/11/30 21:30:43 1.129
+++ file.c 1999/12/01 18:15:01
@@ -339,7 +339,6 @@
set_menu_sensitivity("/Display/Colorize Display...", TRUE);
set_menu_sensitivity("/Display/Find Frame...", TRUE);
set_menu_sensitivity("/Display/Go To Frame...", TRUE);
- set_menu_sensitivity("/Tools/Follow TCP Stream", TRUE);
set_menu_sensitivity("/Tools/Graph", TRUE);
set_menu_sensitivity("/Tools/Summary", TRUE);
@@ -400,7 +399,6 @@
set_menu_sensitivity("/Display/Colorize Display...", TRUE);
set_menu_sensitivity("/Display/Find Frame...", TRUE);
set_menu_sensitivity("/Display/Go To Frame...", TRUE);
- set_menu_sensitivity("/Tools/Follow TCP Stream", TRUE);
set_menu_sensitivity("/Tools/Graph", TRUE);
set_menu_sensitivity("/Tools/Summary", TRUE);
@@ -1507,6 +1505,12 @@
set_menu_sensitivity("/File/Print Packet", TRUE);
set_menu_sensitivity("/Display/Collapse All", TRUE);
set_menu_sensitivity("/Display/Expand All", TRUE);
+
+ if (pi.ipproto == 6) {
+ set_menu_sensitivity("/Tools/Follow TCP Stream", TRUE);
+ } else {
+ set_menu_sensitivity("/Tools/Follow TCP Stream", FALSE);
+ }
}
/* Unselect the selected packet, if any. */
@@ -1530,6 +1534,7 @@
set_menu_sensitivity("/File/Print Packet", FALSE);
set_menu_sensitivity("/Display/Collapse All", FALSE);
set_menu_sensitivity("/Display/Expand All", FALSE);
+ set_menu_sensitivity("/Tools/Follow TCP Stream", FALSE);
}
static void