Fix bug 1377:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Apr 2007 04:57:43 +0000 (04:57 +0000)
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Apr 2007 04:57:43 +0000 (04:57 +0000)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1377

and complaints to the mailing list that a bogus (empty or non-ASCII contents)
dialog box was popped up when getting the list of interfaces.  The problem was
that 'get_airpcap_interface_list()' wasn't setting the returned error value
when it found that AirPcap was not loaded.  If whatever was in that variable
happened to be 1 when a non-AirPcap user requested the list of interfaces
then the bogus dialog would show up.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@21380 f5534014-38df-0310-8fa8-9805f1628bb7

airpcap_loader.c
airpcap_loader.h

index 1e37cb6c18ef93a7746a162be1294e6eb118cc1a..e01b6bc792462598de32c0b2c4858922d230fe79 100644 (file)
@@ -1138,7 +1138,10 @@ get_airpcap_interface_list(int *err, char **err_str)
     char errbuf[PCAP_ERRBUF_SIZE];
 
     if (!AirpcapLoaded)
+    {
+       *err = AIRPCAP_NOT_LOADED;
        return il;
+    }
 
     if (!g_PAirpcapGetDeviceList(&devsList, errbuf))
     {
index 420eb032cd0161212f773725a5b468824b627f39..da345e247a201d1f7ec7dddd187dc3077e39bb5e 100644 (file)
@@ -33,6 +33,7 @@
 /* Error values from "get_airpcap_interface_list()". */
 #define        CANT_GET_AIRPCAP_INTERFACE_LIST 0       /* error getting list */
 #define        NO_AIRPCAP_INTERFACES_FOUND     1       /* list is empty */
+#define AIRPCAP_NOT_LOADED             2       /* Airpcap DLL not loaded */
 
 #define AIRPCAP_CHANNEL_ANY_NAME "ANY"