Make launching TCP graphs from conversations window work again, by supplying stream...
authormartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 5 Dec 2013 14:45:03 +0000 (14:45 +0000)
committermartinm <martinm@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 5 Dec 2013 14:45:03 +0000 (14:45 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@53797 f5534014-38df-0310-8fa8-9805f1628bb7

ui/gtk/conversations_table.c
ui/gtk/gui_stat_menu.h
ui/gtk/tcp_graph.c
ui/tap-tcp-stream.c

index 4cb5ef57f607d962dbc77833b8b497b0f2692f9c..85dbcc5d2376eb043520aa3d2b5a9cd14b06d5e2 100644 (file)
@@ -2511,11 +2511,13 @@ graph_cb(GtkWidget *follow_stream_bt, gboolean reverse_direction)
         /* Invoke the graph */
         if (!reverse_direction) {
             tcp_graph_known_stream_launch(&conv->src_address, conv->src_port,
-                                          &conv->dst_address, conv->dst_port);
+                                          &conv->dst_address, conv->dst_port,
+                                          conv->conv_id);
         }
         else {
             tcp_graph_known_stream_launch(&conv->dst_address, conv->dst_port,
-                                          &conv->src_address, conv->src_port);
+                                          &conv->src_address, conv->src_port,
+                                          conv->conv_id);
         }
     }
     else {
index dd817b4cb3dc3f837c951315b5ac9ad4448ed1d3..b7c62e1925d1a7fa124ad44bc2f289e0c1ce2277 100644 (file)
@@ -157,7 +157,8 @@ void gtk_stats_tree_cb(GtkAction *action, gpointer user_data);
 
 void tcp_graph_cb(GtkAction *action, gpointer user_data);
 void tcp_graph_known_stream_launch(address *src_address, guint16 src_port,
-                                   address *dst_address, guint16 dst_port);
+                                   address *dst_address, guint16 dst_port,
+                                   conv_id_t stream);
 
 
 void gtk_rpcprogs_cb(GtkWidget *w, gpointer data);
index f1120cb41acee55f285fe2774cafcd5a631e944d..1ff7e7fca4801ecc13ef98d58a1e5a23ff07d0bc 100644 (file)
@@ -44,6 +44,7 @@
 #include <epan/epan_dissect.h>
 #include <epan/dissectors/packet-tcp.h>
 #include <epan/address.h>
+#include <epan/conv_id.h>
 
 #include "../../globals.h"
 #include "../../stat_menu.h"
@@ -632,7 +633,8 @@ void tcp_graph_cb(GtkAction *action, gpointer user_data _U_)
 }
 
 void tcp_graph_known_stream_launch(address *src_address, guint16 src_port,
-                                   address *dst_address, guint16 dst_port)
+                                   address *dst_address, guint16 dst_port,
+                                   conv_id_t stream)
 {
     struct gtk_graph *g;
 
@@ -648,6 +650,7 @@ void tcp_graph_known_stream_launch(address *src_address, guint16 src_port,
     g->tg.src_port = src_port;
     COPY_ADDRESS(&g->tg.dst_address, dst_address);
     g->tg.dst_port = dst_port;
+    g->tg.stream = stream;
 
     /* This graph type is arguably the most useful, so start there */
     g->tg.type = GRAPH_TSEQ_TCPTRACE;
index 7ca0b4342f404d80cb75af9575bcfe8c604d7ae4..958480884b58c21fbe4f7306bc286f63cbd614de 100644 (file)
@@ -142,6 +142,9 @@ graph_segment_list_get(capture_file *cf, struct tcp_graph *tg, gboolean stream_k
         tg->dst_port = current.th_dport;
         tg->stream = header->th_stream;
     }
+    else {
+            ts.direction = COMPARE_ANY_DIR;
+    }
 
     /* rescan all the packets and pick up all interesting tcp headers.
      * we only filter for TCP here for speed and do the actual compare