aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-20 11:46:45 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-20 18:47:34 +0000
commitd97ce76161f573beb88fff7eefe4e0f686a4f3a9 (patch)
treef4bce674e348c103d56678915de357f309522a9a
parent9e9d284d9157a8b79964015be868f4e8c43274c3 (diff)
cf_open() pops up a dialog box on errors; its callers shouldn't do so.
Change-Id: I1c65854b5bde1c64d70cb17a13080829f0faa27b Reviewed-on: https://code.wireshark.org/review/21253 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--ui/export_pdu_ui_utils.c2
-rw-r--r--ui/gtk/file_import_dlg.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/ui/export_pdu_ui_utils.c b/ui/export_pdu_ui_utils.c
index 352861e0ab..be8b8915ee 100644
--- a/ui/export_pdu_ui_utils.c
+++ b/ui/export_pdu_ui_utils.c
@@ -72,7 +72,7 @@ exp_pdu_file_open(exp_pdu_t *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);
+ /* cf_open() has put up a dialog box for the error */
goto end;
}
diff --git a/ui/gtk/file_import_dlg.c b/ui/gtk/file_import_dlg.c
index 0daefe5ad4..0e71ca9b34 100644
--- a/ui/gtk/file_import_dlg.c
+++ b/ui/gtk/file_import_dlg.c
@@ -538,24 +538,24 @@ file_import_open(text_import_info_t *info)
}
if (cf_open(&cfile, capfile_name, WTAP_TYPE_AUTO, TRUE /* temporary file */, &err) != CF_OK) {
- open_failure_alert_box(capfile_name, err, FALSE);
+ /* cf_open() put up a dialog box here */
goto end;
}
switch (cf_read(&cfile, FALSE)) {
case CF_READ_OK:
case CF_READ_ERROR:
- /* Just because we got an error, that doesn't mean we were unable
- to read any of the file; we handle what we could get from the
- file. */
- break;
+ /* Just because we got an error, that doesn't mean we were unable
+ to read any of the file; we handle what we could get from the
+ file. */
+ break;
case CF_READ_ABORTED:
- /* The user bailed out of re-reading the capture file; the
- capture file has been closed - just free the capture file name
- string and return (without changing the last containing
- directory). */
- break;
+ /* The user bailed out of re-reading the capture file; the
+ capture file has been closed - just free the capture file name
+ string and return (without changing the last containing
+ directory). */
+ break;
}
end: