aboutsummaryrefslogtreecommitdiffstats
path: root/extcap
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 /extcap
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 'extcap')
-rw-r--r--extcap/androiddump.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index a6d838fa41..85eefb87e7 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -449,19 +449,20 @@ static struct extcap_dumper extcap_dumper_open(char *fifo, int encap) {
#else
wtap_dump_params params = WTAP_DUMP_PARAMS_INIT;
int err = 0;
+ gchar *err_info = NULL;
wtap_init(FALSE);
params.encap = encap;
params.snaplen = PACKET_LENGTH;
- extcap_dumper.dumper.wtap = wtap_dump_open(fifo, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC, WTAP_UNCOMPRESSED, &params, &err);
+ extcap_dumper.dumper.wtap = wtap_dump_open(fifo, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC, WTAP_UNCOMPRESSED, &params, &err, &err_info);
if (!extcap_dumper.dumper.wtap) {
- cfile_dump_open_failure_message("androiddump", fifo, err, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC);
+ cfile_dump_open_failure_message("androiddump", fifo, err, err_info, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC);
exit(EXIT_CODE_CANNOT_SAVE_WIRETAP_DUMP);
}
extcap_dumper.encap = encap;
if (!wtap_dump_flush(extcap_dumper.dumper.wtap, &err)) {
- cfile_dump_open_failure_message("androiddump", fifo, err, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC);
+ cfile_dump_open_failure_message("androiddump", fifo, err, NULL, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC);
exit(EXIT_CODE_CANNOT_SAVE_WIRETAP_DUMP);
}
#endif