Diffstat (limited to 'noncore/net/networksetup/wlan/wextensions.cpp') (more/less context) (ignore 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 | |||
@@ -16,9 +16,11 @@ | |||
16 | /** | 16 | /** |
17 | * Constructor. Sets hasWirelessExtensions | 17 | * Constructor. Sets hasWirelessExtensions |
18 | */ | 18 | */ |
19 | WExtensions::WExtensions(QString interfaceName){ | 19 | WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false){ |
20 | interface = interfaceName; | 20 | interface = interfaceName; |
21 | fd = socket( AF_INET, SOCK_DGRAM, 0 ); | 21 | fd = socket( AF_INET, SOCK_DGRAM, 0 ); |
22 | if(fd == -1) | ||
23 | return; | ||
22 | 24 | ||
23 | const char* buffer[200]; | 25 | const char* buffer[200]; |
24 | memset( &iwr, 0, sizeof( iwr ) ); | 26 | memset( &iwr, 0, sizeof( iwr ) ); |
@@ -35,8 +37,6 @@ WExtensions::WExtensions(QString interfaceName){ | |||
35 | strcpy( iwr.ifr_ifrn.ifrn_name, (const char *)iname ); | 37 | strcpy( iwr.ifr_ifrn.ifrn_name, (const char *)iname ); |
36 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr ) ) | 38 | if ( 0 == ioctl( fd, SIOCGIWESSID, &iwr ) ) |
37 | hasWirelessExtensions = true; | 39 | hasWirelessExtensions = true; |
38 | else | ||
39 | hasWirelessExtensions = false; | ||
40 | } | 40 | } |
41 | 41 | ||
42 | /** | 42 | /** |