diff options
author | Guy Harris <gharris@sonic.net> | 2020-10-13 18:48:46 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-10-14 04:51:45 +0000 |
commit | 6e6233521aa4f0e82b79219cb7e32912012d9ccf (patch) | |
tree | 1836305bf265c1aff78d61677343f3fa23bc2aac /extcap | |
parent | 92e1b110f3f70d295adb10ce0dc5fad9a7189912 (diff) | |
download | wireshark-6e6233521aa4f0e82b79219cb7e32912012d9ccf.tar.gz wireshark-6e6233521aa4f0e82b79219cb7e32912012d9ccf.tar.bz2 wireshark-6e6233521aa4f0e82b79219cb7e32912012d9ccf.zip |
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.c | 7 |
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, ¶ms, &err); + extcap_dumper.dumper.wtap = wtap_dump_open(fifo, WTAP_FILE_TYPE_SUBTYPE_PCAP_NSEC, WTAP_UNCOMPRESSED, ¶ms, &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 |