-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 | |||
@@ -169,18 +169,21 @@ public slots: | |||
169 | } | 169 | } |
170 | 170 | ||
171 | OWaveLanManagementPacket* beacon = (OWaveLanManagementPacket*) p->child( "802.11 Management" ); | 171 | OWaveLanManagementPacket* beacon = (OWaveLanManagementPacket*) p->child( "802.11 Management" ); |
172 | 172 | ||
173 | if ( beacon ) | 173 | if ( beacon ) |
174 | { | 174 | { |
175 | if ( stations.find( beacon->SSID() ) ) | 175 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); |
176 | stations[beacon->SSID()]->beacons++; | 176 | QString essid = ssid ? ssid->ID() : "<unknown>"; |
177 | |||
178 | if ( stations.find( essid ) ) | ||
179 | stations[essid]->beacons++; | ||
177 | else | 180 | else |
178 | { | 181 | { |
179 | printf( "found new network @ channel %d, SSID = '%s'\n", wiface->channel(), (const char*) beacon->SSID() ); | 182 | printf( "found new network @ channel %d, SSID = '%s'\n", wiface->channel(), (const char*) essid ); |
180 | stations.insert( beacon->SSID(), new Station( "unknown", wiface->channel(), | 183 | stations.insert( essid, new Station( "unknown", wiface->channel(), |
181 | ((OWaveLanPacket*) beacon->parent())->usesWep() ) ); | 184 | ((OWaveLanPacket*) beacon->parent())->usesWep() ) ); |
182 | } | 185 | } |
183 | } | 186 | } |
184 | } | 187 | } |
185 | private: | 188 | private: |
186 | OPacketCapturer* cap; | 189 | OPacketCapturer* cap; |