summaryrefslogtreecommitdiff
path: root/ui/qt/main_window.cpp
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-12-03 17:57:34 -0800
committerGuy Harris <guy@alum.mit.edu>2016-12-04 03:12:23 +0000
commitdd98856afce144eb19104a6f40c1abedc9069558 (patch)
tree2136bbdee3544f4324bf214a78aff65da350682c /ui/qt/main_window.cpp
parent5aede1bc50b6bb9ae13926e2249d22d95c12814e (diff)
downloadwireshark-dd98856afce144eb19104a6f40c1abedc9069558.tar.gz
Have separate merge APIs for regular file/temporary file/standard output.
This is similar to what we have for opening a dump file - one API that uses the file name as specified, one that creates a temporary file and provides the file name, and one that uses the standard output. All of those APIs handle closing the output file. Change-Id: I56beea7be347402773460b9148ab31a8f8bc51e1 Reviewed-on: https://code.wireshark.org/review/19059 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/qt/main_window.cpp')
-rw-r--r--ui/qt/main_window.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index 8ed0f6a087..506907917d 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -1075,22 +1075,21 @@ void MainWindow::mergeCaptureFile()
file_type = capture_file_.capFile()->cd_t;
/* Try to merge or append the two files */
- tmpname = NULL;
if (merge_dlg.mergeType() == 0) {
/* chronological order */
in_filenames[0] = g_strdup(capture_file_.capFile()->filename);
in_filenames[1] = qstring_strdup(file_name);
- merge_status = cf_merge_files(&tmpname, 2, in_filenames, file_type, FALSE);
+ merge_status = cf_merge_files_to_tempfile(&tmpname, 2, in_filenames, file_type, FALSE);
} else if (merge_dlg.mergeType() <= 0) {
/* prepend file */
in_filenames[0] = qstring_strdup(file_name);
in_filenames[1] = g_strdup(capture_file_.capFile()->filename);
- merge_status = cf_merge_files(&tmpname, 2, in_filenames, file_type, TRUE);
+ merge_status = cf_merge_files_to_tempfile(&tmpname, 2, in_filenames, file_type, TRUE);
} else {
/* append file */
in_filenames[0] = g_strdup(capture_file_.capFile()->filename);
in_filenames[1] = qstring_strdup(file_name);
- merge_status = cf_merge_files(&tmpname, 2, in_filenames, file_type, TRUE);
+ merge_status = cf_merge_files_to_tempfile(&tmpname, 2, in_filenames, file_type, TRUE);
}
g_free(in_filenames[0]);