Diffstat (limited to 'noncore/net/networksetup/wlan/wextensions.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/networksetup/wlan/wextensions.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/networksetup/wlan/wextensions.cpp b/noncore/net/networksetup/wlan/wextensions.cpp index e545bd1..eb6fc42 100644 --- a/noncore/net/networksetup/wlan/wextensions.cpp +++ b/noncore/net/networksetup/wlan/wextensions.cpp @@ -17,7 +17,9 @@ * Constructor. Sets hasWirelessExtensions */ -WExtensions::WExtensions(QString interfaceName){ +WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false){ interface = interfaceName; fd = socket( AF_INET, SOCK_DGRAM, 0 ); + if(fd == -1) + return; const char* buffer[200]; @@ -36,6 +38,4 @@ WExtensions::WExtensions(QString interfaceName){ if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr ) ) hasWirelessExtensions = true; - else - hasWirelessExtensions = false; } |