diff options
author | Guy Harris <gharris@sonic.net> | 2021-02-25 10:49:30 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-02-25 10:49:30 -0800 |
commit | 925f4d4987ee9b221a97596b5b998a81df5d6f0a (patch) | |
tree | 1f2a7097659f1f6f8f0746ed5b6cde2563677517 /pcap-airpcap.c | |
parent | b1f9b176115eae9235ac4fd48aa0da9c61f46e67 (diff) |
airpcap: don't treat the absence of airpcap.dll as an error.
Most users probably won't have it installed, so treat its absence as an
indication that they don't have an AirPcap device.
Diffstat (limited to 'pcap-airpcap.c')
-rw-r--r-- | pcap-airpcap.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pcap-airpcap.c b/pcap-airpcap.c index 703f23ac..d986ad9c 100644 --- a/pcap-airpcap.c +++ b/pcap-airpcap.c @@ -158,7 +158,7 @@ load_airpcap_functions(void) * AIRPCAP_API_LOADING, in which case *we're* the * ones loading it, and should now try to do so. */ - if (current_status == AIRPCAP_API_LOADED) + if (current_status == AIRPCAP_API_LOADED) return AIRPCAP_API_LOADED; if (current_status == AIRPCAP_API_CANNOT_LOAD) @@ -974,7 +974,14 @@ airpcap_create(const char *device, char *ebuf, int *is_ours) * so do so if we haven't already tried to do so. */ if (load_airpcap_functions() != AIRPCAP_API_LOADED) { - snprintf(ebuf, PCAP_ERRBUF_SIZE, "Couldn't load AirPcap DLL\n"); + /* + * We assume this means that we don't have the AirPcap + * software installed, which probably means we don't + * have an AirPcap device. + * + * Don't treat that as an error. + */ + *is_ours = 0; return (NULL); } |