From d97ce76161f573beb88fff7eefe4e0f686a4f3a9 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 20 Apr 2017 11:46:45 -0700 Subject: 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 --- ui/export_pdu_ui_utils.c | 2 +- ui/gtk/file_import_dlg.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'ui') 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: -- cgit v1.2.1