summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp6
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp15
2 files changed, 16 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 1525934..1ef24d2 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -275,5 +275,5 @@ void MScanListItem::serializeTo( QDataStream& s ) const
275 275
276 s << _type; 276 s << _type;
277 s << (Q_UINT8) _wep; 277 s << (Q_UINT8) ( _wep ? 'y' : 'n' );
278} 278}
279 279
@@ -283,6 +283,8 @@ void MScanListItem::serializeFrom( QDataStream& s )
283 OListViewItem::serializeFrom( s ); 283 OListViewItem::serializeFrom( s );
284 284
285 char wep;
285 s >> _type; 286 s >> _type;
286 s >> (Q_UINT8) _wep; 287 s >> (Q_UINT8) wep;
288 _wep = (wep == 'y');
287 289
288 QString name; 290 QString name;
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 8d18f73..8c2c315 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -115,11 +115,20 @@ void Wellenreiter::receivePacket(OPacket* p)
115 // check if we received a beacon frame 115 // check if we received a beacon frame
116 OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) ); 116 OWaveLanManagementPacket* beacon = static_cast<OWaveLanManagementPacket*>( p->child( "802.11 Management" ) );
117 if ( beacon ) 117 if ( beacon && beacon->managementType() == "Beacon" )
118 { 118 {
119 QString type; 119 QString type;
120 if ( beacon->canIBSS() ) 120 if ( beacon->canIBSS() )
121 {
121 type = "adhoc"; 122 type = "adhoc";
122 else 123 }
124 else if ( beacon->canESS() )
125 {
123 type = "managed"; 126 type = "managed";
127 }
128 else
129 {
130 qDebug( "Wellenreiter::invalid frame detected: '%s'", (const char*) p->dump( 16 ) );
131 return;
132 }
124 133
125 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); 134 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) );
@@ -129,5 +138,5 @@ void Wellenreiter::receivePacket(OPacket* p)
129 138
130 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); 139 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
131 netView()->addNewItem( type, essid, header->macAddress2().toString(), header->usesWep(), channel, 0 ); 140 netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 );
132 return; 141 return;
133 } 142 }