Diffstat (limited to 'libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp index aec9cc7..7581888 100644 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp +++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp @@ -173,10 +173,13 @@ public slots: if ( beacon ) { - if ( stations.find( beacon->SSID() ) ) - stations[beacon->SSID()]->beacons++; + OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); + QString essid = ssid ? ssid->ID() : "<unknown>"; + + if ( stations.find( essid ) ) + stations[essid]->beacons++; else { - printf( "found new network @ channel %d, SSID = '%s'\n", wiface->channel(), (const char*) beacon->SSID() ); - stations.insert( beacon->SSID(), new Station( "unknown", wiface->channel(), + printf( "found new network @ channel %d, SSID = '%s'\n", wiface->channel(), (const char*) essid ); + stations.insert( essid, new Station( "unknown", wiface->channel(), ((OWaveLanPacket*) beacon->parent())->usesWep() ) ); } |