diff options
Diffstat (limited to 'ui/export_pdu_ui_utils.c')
-rw-r--r-- | ui/export_pdu_ui_utils.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/export_pdu_ui_utils.c b/ui/export_pdu_ui_utils.c index 133e511df8..0f2ee8d4b1 100644 --- a/ui/export_pdu_ui_utils.c +++ b/ui/export_pdu_ui_utils.c @@ -46,17 +46,20 @@ static void exp_pdu_file_open(exp_pdu_t *exp_pdu_tap_data) { int import_file_fd; - char *tmpname, *capfile_name; + char *tmpname, *capfile_name, *comment; int err; /* Choose a random name for the temporary import buffer */ import_file_fd = create_tempfile(&tmpname, "Wireshark_PDU_", NULL); capfile_name = g_strdup(tmpname); - err = exp_pdu_open(exp_pdu_tap_data, import_file_fd, - g_strdup_printf("Dump of PDUs from %s", cfile.filename)); + comment = g_strdup_printf("Dump of PDUs from %s", cfile.filename); + err = exp_pdu_open(exp_pdu_tap_data, import_file_fd, comment); if (err != 0) { - open_failure_alert_box(capfile_name ? capfile_name : "temporary file", err, TRUE); + g_free(comment); + cfile_open_failure_alert_box(capfile_name ? capfile_name : "temporary file", + err, NULL, TRUE, + WTAP_FILE_TYPE_SUBTYPE_PCAPNG); goto end; } |