diff options
author | Michael Mann <mmann78@netscape.net> | 2017-09-21 23:20:03 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-09-22 04:49:48 +0000 |
commit | 5f667694d3bbd57f13c26d3588d5671dfd30d09a (patch) | |
tree | e3dbdd8cf9c62acc73b51bc3895ed8b6f3f14ca8 /ui/qt/sequence_dialog.cpp | |
parent | 620d54b1e3a4fcad1994409013f6a5b2b76913b4 (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/qt/sequence_dialog.cpp')
-rw-r--r-- | ui/qt/sequence_dialog.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp index 9af0232787..4842c0ed93 100644 --- a/ui/qt/sequence_dialog.cpp +++ b/ui/qt/sequence_dialog.cpp @@ -27,6 +27,7 @@ #include "file.h" #include "wsutil/nstime.h" #include "wsutil/utf8_entities.h" +#include "wsutil/file_util.h" #include <ui/qt/utils/color_utils.h> #include "progress_frame.h" @@ -400,7 +401,13 @@ void SequenceDialog::on_buttonBox_accepted() } else if (extension.compare(jpeg_filter) == 0) { save_ok = ui->sequencePlot->saveJpg(file_name); } else if (extension.compare(ascii_filter) == 0 && !file_closed_ && info_->sainfo()) { - save_ok = sequence_analysis_dump_to_file(file_name.toUtf8().constData(), info_->sainfo(), 0); + FILE *outfile = ws_fopen(file_name.toUtf8().constData(), "w"); + if (outfile != NULL) { + sequence_analysis_dump_to_file(outfile, info_->sainfo(), 0); + save_ok = true; + } else { + save_ok = false; + } } // else error dialog? if (save_ok) { |