-rw-r--r-- | libopie2/opienet/onetwork.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 0a74019..f4bdbe0 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp | |||
@@ -101,12 +101,18 @@ void ONetwork::synchronize() | |||
101 | s.readLine(); | 101 | s.readLine(); |
102 | while ( !s.atEnd() ) | 102 | while ( !s.atEnd() ) |
103 | { | 103 | { |
104 | s >> str; | 104 | s >> str; |
105 | str.truncate( str.find( ':' ) ); | 105 | str.truncate( str.find( ':' ) ); |
106 | odebug << "ONetwork: found interface '" << str << "'" << oendl; | 106 | odebug << "ONetwork: found interface '" << str << "'" << oendl; |
107 | if ( str.startsWith( "wifi" ) ) | ||
108 | { | ||
109 | odebug << "ONetwork: ignoring hostap control interface" << oendl; | ||
110 | s.readLine(); | ||
111 | continue; | ||
112 | } | ||
107 | ONetworkInterface* iface = 0; | 113 | ONetworkInterface* iface = 0; |
108 | if ( isWirelessInterface( str ) ) | 114 | if ( isWirelessInterface( str ) ) |
109 | { | 115 | { |
110 | iface = new OWirelessNetworkInterface( this, (const char*) str ); | 116 | iface = new OWirelessNetworkInterface( this, (const char*) str ); |
111 | odebug << "ONetwork: interface '" << str << "' has Wireless Extensions" << oendl; | 117 | odebug << "ONetwork: interface '" << str << "' has Wireless Extensions" << oendl; |
112 | } | 118 | } |
@@ -805,13 +811,13 @@ QString OWirelessNetworkInterface::nickName() const | |||
805 | if ( !wioctl( SIOCGIWNICKN ) ) | 811 | if ( !wioctl( SIOCGIWNICKN ) ) |
806 | { | 812 | { |
807 | return "<unknown>"; | 813 | return "<unknown>"; |
808 | } | 814 | } |
809 | else | 815 | else |
810 | { | 816 | { |
811 | str[_iwr.u.data.length] = 0x0; // some drivers (e.g. wlan-ng) don't zero-terminate the string | 817 | str[_iwr.u.data.length] = '\0'; // some drivers don't zero-terminate the string |
812 | return str; | 818 | return str; |
813 | } | 819 | } |
814 | } | 820 | } |
815 | 821 | ||
816 | 822 | ||
817 | void OWirelessNetworkInterface::setPrivate( const QString& call, int numargs, ... ) | 823 | void OWirelessNetworkInterface::setPrivate( const QString& call, int numargs, ... ) |
@@ -863,12 +869,13 @@ QString OWirelessNetworkInterface::SSID() const | |||
863 | if ( !wioctl( SIOCGIWESSID ) ) | 869 | if ( !wioctl( SIOCGIWESSID ) ) |
864 | { | 870 | { |
865 | return "<unknown>"; | 871 | return "<unknown>"; |
866 | } | 872 | } |
867 | else | 873 | else |
868 | { | 874 | { |
875 | str[_iwr.u.essid.length] = '\0'; // some drivers don't zero-terminate the string | ||
869 | return str; | 876 | return str; |
870 | } | 877 | } |
871 | } | 878 | } |
872 | 879 | ||
873 | 880 | ||
874 | void OWirelessNetworkInterface::setSSID( const QString& ssid ) | 881 | void OWirelessNetworkInterface::setSSID( const QString& ssid ) |