diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-04-04 19:26:07 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-04-04 19:26:07 +0000 |
commit | 43ca745bb99d0a7d19cb89cbf1077ef8a1ae37c3 (patch) | |
tree | 06c21dad77853d4ae954da57d93bae4bc548daf5 /dumpcap.c | |
parent | 9c781b0939c6c4fc863f7f560bf46ca13349039a (diff) | |
download | wireshark-43ca745bb99d0a7d19cb89cbf1077ef8a1ae37c3.tar.gz |
Work around that WinPcap bug for another pcap_open() call.
svn path=/trunk/; revision=41938
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -637,6 +637,13 @@ open_capture_device(interface_options *interface_opts, (interface_opts->datatx_udp ? PCAP_OPENFLAG_DATATX_UDP : 0) | (interface_opts->nocap_rpcap ? PCAP_OPENFLAG_NOCAPTURE_RPCAP : 0), CAP_READ_TIMEOUT, &auth, *open_err_str); + if ((*open_err_str)[0] == '\0') { + /* Work around known WinPcap bug wherein no error message is + filled in on a failure to open an rpcap: URL. */ + g_strlcpy(*open_err_str, + "Unknown error (pcap bug; actual error cause not reported)", + sizef *open_err_str); + } g_log(LOG_DOMAIN_CAPTURE_CHILD, G_LOG_LEVEL_DEBUG, "pcap_open() returned %p.", (void *)pcap_h); } else |