aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/graph_analysis.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-09-21 23:20:03 -0400
committerAnders Broman <a.broman58@gmail.com>2017-09-22 04:49:48 +0000
commit5f667694d3bbd57f13c26d3588d5671dfd30d09a (patch)
treee3dbdd8cf9c62acc73b51bc3895ed8b6f3f14ca8 /ui/gtk/graph_analysis.c
parent620d54b1e3a4fcad1994409013f6a5b2b76913b4 (diff)
Add Flow Graph functionality to TShark
Add flow graph functionality to tshark through -z option. Output is same as ASCII format saved from GUI. Change-Id: Iee0bfea7215858e6488b4728581be28287e9ea1a Reviewed-on: https://code.wireshark.org/review/23652 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk/graph_analysis.c')
-rw-r--r--ui/gtk/graph_analysis.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/gtk/graph_analysis.c b/ui/gtk/graph_analysis.c
index a5f7d2cabb..407eb3c1ab 100644
--- a/ui/gtk/graph_analysis.c
+++ b/ui/gtk/graph_analysis.c
@@ -255,6 +255,7 @@ on_save_bt_clicked (GtkWidget *button _U_,
graph_analysis_data_t *user_data)
{
char *pathname;
+ FILE *outfile;
/*
* Loop until the user either selects a file or gives up.
@@ -265,8 +266,10 @@ on_save_bt_clicked (GtkWidget *button _U_,
/* User gave up. */
break;
}
- if (sequence_analysis_dump_to_file(pathname, user_data->graph_info, user_data->dlg.first_node)) {
- /* We succeeded. */
+ outfile = ws_fopen(pathname, "w");
+ if (outfile != NULL) {
+ sequence_analysis_dump_to_file(outfile, user_data->graph_info, user_data->dlg.first_node);
+ fclose (outfile);
g_free(pathname);
break;
} else {