aboutsummaryrefslogtreecommitdiffstats
path: root/reordercap.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-10-13 18:48:46 -0700
committerGuy Harris <gharris@sonic.net>2020-10-14 04:51:45 +0000
commit6e6233521aa4f0e82b79219cb7e32912012d9ccf (patch)
tree1836305bf265c1aff78d61677343f3fa23bc2aac /reordercap.c
parent92e1b110f3f70d295adb10ce0dc5fad9a7189912 (diff)
Have WTAP_ERR_INTERNAL include an err_info string giving details.
That way, users won't just see "You got an internal error", the details will be given, so they can report them in a bug.
Diffstat (limited to 'reordercap.c')
-rw-r--r--reordercap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/reordercap.c b/reordercap.c
index 953bd27e4b..291bcb11be 100644
--- a/reordercap.c
+++ b/reordercap.c
@@ -264,15 +264,17 @@ main(int argc, char *argv[])
/* Open outfile (same filetype/encap as input file) */
if (strcmp(outfile, "-") == 0) {
- pdh = wtap_dump_open_stdout(wtap_file_type_subtype(wth), WTAP_UNCOMPRESSED, &params, &err);
+ pdh = wtap_dump_open_stdout(wtap_file_type_subtype(wth),
+ WTAP_UNCOMPRESSED, &params, &err, &err_info);
} else {
- pdh = wtap_dump_open(outfile, wtap_file_type_subtype(wth), WTAP_UNCOMPRESSED, &params, &err);
+ pdh = wtap_dump_open(outfile, wtap_file_type_subtype(wth),
+ WTAP_UNCOMPRESSED, &params, &err, &err_info);
}
g_free(params.idb_inf);
params.idb_inf = NULL;
if (pdh == NULL) {
- cfile_dump_open_failure_message("reordercap", outfile, err,
+ cfile_dump_open_failure_message("reordercap", outfile, err, err_info,
wtap_file_type_subtype(wth));
wtap_dump_params_cleanup(&params);
ret = OUTPUT_FILE_ERROR;
@@ -341,8 +343,8 @@ main(int argc, char *argv[])
g_ptr_array_free(frames, TRUE);
/* Close outfile */
- if (!wtap_dump_close(pdh, &err)) {
- cfile_close_failure_message(outfile, err);
+ if (!wtap_dump_close(pdh, &err, &err_info)) {
+ cfile_close_failure_message(outfile, err, err_info);
wtap_dump_params_cleanup(&params);
ret = OUTPUT_FILE_ERROR;
goto clean_exit;