diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-12-10 21:42:02 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-12-10 21:42:02 +0000 |
commit | be4179a86512e18944ffcfe7c37f366ebf2b975d (patch) | |
tree | 957b355ea8a4fde7a0695573444453872fdac1a5 /gtk | |
parent | b2d9276356f209857fab074583768f83b012d484 (diff) | |
download | wireshark-be4179a86512e18944ffcfe7c37f366ebf2b975d.tar.gz wireshark-be4179a86512e18944ffcfe7c37f366ebf2b975d.tar.bz2 wireshark-be4179a86512e18944ffcfe7c37f366ebf2b975d.zip |
Test the link-layer type of the frame being looked at, not the
currently-selected frame - they're not necessarily the same.
svn path=/trunk/; revision=4380
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/tcp_graph.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gtk/tcp_graph.c b/gtk/tcp_graph.c index 01e3f6b06a..0332f5b0f1 100644 --- a/gtk/tcp_graph.c +++ b/gtk/tcp_graph.c @@ -3,7 +3,7 @@ * By Pavel Mores <pvl@uh.cz> * Win32 port: rwh@unifiedtech.com * - * $Id: tcp_graph.c,v 1.6 2001/12/10 21:26:25 guy Exp $ + * $Id: tcp_graph.c,v 1.7 2001/12/10 21:42:02 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -419,7 +419,7 @@ static void callback_graph_init_on_typechg (GtkWidget * , gpointer ); static void callback_create_help (GtkWidget * , gpointer ); static void callback_close_help (GtkWidget * , gpointer ); static void update_zoom_spins (struct graph * ); -static int get_headers (char * , struct segment * ); +static int get_headers (frame_data *, char * , struct segment * ); static int compare_headers (struct segment * , struct segment * , int ); static int get_num_dsegs (struct graph * ); static int get_num_acks (struct graph * ); @@ -546,7 +546,7 @@ void tcp_graph_cb (GtkWidget *w, gpointer data, guint graph_type) graph_put (g); g->type = graph_type; - if (!get_headers (cfile.pd, ¤t)) { + if (!get_headers (cfile.current_frame, cfile.pd, ¤t)) { /* currently selected packet is neither TCP over IP over Ethernet II/PPP * nor TCP over IP alone - should display some * kind of warning dialog */ @@ -1732,7 +1732,7 @@ static void graph_segment_list_get (struct graph *g) int condition; debug(DBS_FENTRY) puts ("graph_segment_list_get()"); - get_headers (cfile.pd, ¤t); + get_headers (cfile.current_frame, cfile.pd, ¤t); if (g->type == GRAPH_THROUGHPUT) condition = COMPARE_CURR_DIR; else @@ -1745,7 +1745,7 @@ static void graph_segment_list_get (struct graph *g) segment = (struct segment * )malloc (sizeof (struct segment)); if (!segment) perror ("malloc failed"); - if (!get_headers (pd, segment)) + if (!get_headers (ptr, pd, segment)) continue; /* not TCP over IP over Ethernet II */ if (compare_headers (¤t, segment, condition)) { segment->next = NULL; @@ -1769,9 +1769,8 @@ static void graph_segment_list_get (struct graph *g) } } -static int get_headers (char *pd, struct segment *hdrs) +static int get_headers (frame_data *fd, char *pd, struct segment *hdrs) { - frame_data *fd = cfile.current_frame; struct ether_header *e; struct ppp_header *p; void *ip; |