diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gtk/capture_file_dlg.c | 4 | ||||
-rw-r--r-- | ui/gtk/funnel_stat.c | 2 | ||||
-rw-r--r-- | ui/qt/main_window_slots.cpp | 2 | ||||
-rw-r--r-- | ui/tap_export_pdu.c | 1 |
4 files changed, 5 insertions, 4 deletions
diff --git a/ui/gtk/capture_file_dlg.c b/ui/gtk/capture_file_dlg.c index e350342c0a..baef2baed9 100644 --- a/ui/gtk/capture_file_dlg.c +++ b/ui/gtk/capture_file_dlg.c @@ -709,7 +709,7 @@ file_open_cmd(capture_file *cf, GtkWidget *w _U_) continue; } - /* Try to open the capture file. */ + /* Try to open the capture file. This closes the current file if it succeeds. */ if (cf_open(&cfile, file_name->str, type, FALSE, &err) != CF_OK) { /* We couldn't open it; don't dismiss the open dialog box, just leave it around so that the user can, after they @@ -990,7 +990,7 @@ file_merge_cmd(GtkWidget *w _U_) cf_close(&cfile); - /* Try to open the merged capture file. */ + /* Try to open the merged capture file. This closes the current file if it succeeds. */ if (cf_open(&cfile, tmpname, WTAP_TYPE_AUTO, TRUE /* temporary file */, &err) != CF_OK) { /* We couldn't open it; fail. */ if (rfcode != NULL) diff --git a/ui/gtk/funnel_stat.c b/ui/gtk/funnel_stat.c index 1b3dc00662..5d03fefbde 100644 --- a/ui/gtk/funnel_stat.c +++ b/ui/gtk/funnel_stat.c @@ -515,7 +515,7 @@ static gboolean funnel_open_file(const char* fname, const char* filter, const ch } } - + /* This closes the current file if it succeeds. */ if (cf_open(&cfile, fname, WTAP_TYPE_AUTO, FALSE, &err) != CF_OK) { *err_str = g_strerror(err); if (rfcode != NULL) dfilter_free(rfcode); diff --git a/ui/qt/main_window_slots.cpp b/ui/qt/main_window_slots.cpp index ddc13e2d84..78a175d15b 100644 --- a/ui/qt/main_window_slots.cpp +++ b/ui/qt/main_window_slots.cpp @@ -150,7 +150,7 @@ void MainWindow::openCaptureFile(QString& cf_path, QString& display_filter, unsi } } - /* Try to open the capture file. */ + /* Try to open the capture file. This closes the current file if it succeeds. */ cfile.window = this; if (cf_open(&cfile, cf_path.toUtf8().constData(), type, FALSE, &err) != CF_OK) { /* We couldn't open it; don't dismiss the open dialog box, diff --git a/ui/tap_export_pdu.c b/ui/tap_export_pdu.c index 7c35ad36d5..2191c40066 100644 --- a/ui/tap_export_pdu.c +++ b/ui/tap_export_pdu.c @@ -161,6 +161,7 @@ exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data) remove_tap_listener(exp_pdu_tap_data); + /* XXX: should this use the open_routine type in the cfile instead of WTAP_TYPE_AUTO? */ if (cf_open(&cfile, capfile_name, WTAP_TYPE_AUTO, TRUE /* temporary file */, &err) != CF_OK) { open_failure_alert_box(capfile_name, err, FALSE); goto end; |