author | mickeyl <mickeyl> | 2002-12-11 13:47:44 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-12-11 13:47:44 (UTC) |
commit | 16138f0cdf46994d20ade71b5621b82fb9386933 (patch) (unidiff) | |
tree | 124be86049cf95260105b03a80c21b5f87b48a11 | |
parent | 2b3c450378c1da0a2175c91d652ce2eae5614ff8 (diff) | |
download | opie-16138f0cdf46994d20ade71b5621b82fb9386933.zip opie-16138f0cdf46994d20ade71b5621b82fb9386933.tar.gz opie-16138f0cdf46994d20ade71b5621b82fb9386933.tar.bz2 |
- Reduce g++ warnings.
- Depend on libpcap
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 8 | ||||
-rw-r--r-- | noncore/net/wellenreiter/opie-wellenreiter.control | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 3453d18..5808e9c 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -147,84 +147,84 @@ bool Wellenreiter::hasMessage() | |||
147 | return true; //FD_ISSET( daemon_fd, &rfds ); gibbet 'eh nur einen Deskriptor | 147 | return true; //FD_ISSET( daemon_fd, &rfds ); gibbet 'eh nur einen Deskriptor |
148 | } | 148 | } |
149 | 149 | ||
150 | void Wellenreiter::timerEvent( QTimerEvent* e ) | 150 | void Wellenreiter::timerEvent( QTimerEvent* e ) |
151 | { | 151 | { |
152 | qDebug( "checking for message..." ); | 152 | qDebug( "checking for message..." ); |
153 | if ( hasMessage() ) | 153 | if ( hasMessage() ) |
154 | { | 154 | { |
155 | qDebug( "got message" ); | 155 | qDebug( "got message" ); |
156 | handleMessage(); | 156 | handleMessage(); |
157 | } | 157 | } |
158 | else | 158 | else |
159 | { | 159 | { |
160 | qDebug( "no message..." ); | 160 | qDebug( "no message..." ); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | void Wellenreiter::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) | 164 | void Wellenreiter::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) |
165 | { | 165 | { |
166 | // FIXME: this code belongs in customized QListView, not into this class | 166 | // FIXME: this code belongs in customized QListView, not into this class |
167 | // FIXME: scanlistitem needs a proper encapsulation and not such a damn dealing with text(...) | 167 | // FIXME: scanlistitem needs a proper encapsulation and not such a damn dealing with text(...) |
168 | 168 | ||
169 | qDebug( "Wellenreiter::addNewItem( %s / %s / %s [%d]", | 169 | qDebug( "Wellenreiter::addNewItem( %s / %s / %s [%d]", |
170 | (const char*) type, | 170 | (const char*) type, |
171 | (const char*) essid, | 171 | (const char*) essid, |
172 | (const char*) macaddr, | 172 | (const char*) macaddr, |
173 | channel ); | 173 | channel ); |
174 | 174 | ||
175 | // search, if we already have seen this net | 175 | // search, if we already have seen this net |
176 | 176 | ||
177 | QString s; | 177 | QString s; |
178 | MScanListItem* network; | 178 | MScanListItem* network; |
179 | MScanListItem* item = (MScanListItem*) netview->firstChild(); | 179 | MScanListItem* item = static_cast<MScanListItem*> ( netview->firstChild() ); |
180 | 180 | ||
181 | while ( item && ( item->text( 0 ) != essid ) ) | 181 | while ( item && ( item->text( 0 ) != essid ) ) |
182 | { | 182 | { |
183 | qDebug( "itemtext: %s", (const char*) item->text( 0 ) ); | 183 | qDebug( "itemtext: %s", (const char*) item->text( 0 ) ); |
184 | item = item->itemBelow(); | 184 | item = static_cast<MScanListItem*> ( item->itemBelow() ); |
185 | } | 185 | } |
186 | if ( item ) | 186 | if ( item ) |
187 | { | 187 | { |
188 | // we have already seen this net, check all childs if MAC exists | 188 | // we have already seen this net, check all childs if MAC exists |
189 | 189 | ||
190 | network = item; | 190 | network = item; |
191 | 191 | ||
192 | item = item->firstChild(); | 192 | item = static_cast<MScanListItem*> ( item->firstChild() ); |
193 | assert( item ); // this shouldn't fail | 193 | assert( item ); // this shouldn't fail |
194 | 194 | ||
195 | while ( item && ( item->text( 2 ) != macaddr ) ) | 195 | while ( item && ( item->text( 2 ) != macaddr ) ) |
196 | { | 196 | { |
197 | qDebug( "subitemtext: %s", (const char*) item->text( 2 ) ); | 197 | qDebug( "subitemtext: %s", (const char*) item->text( 2 ) ); |
198 | item = item->itemBelow(); | 198 | item = static_cast<MScanListItem*> ( item->itemBelow() ); |
199 | } | 199 | } |
200 | 200 | ||
201 | if ( item ) | 201 | if ( item ) |
202 | { | 202 | { |
203 | // we have already seen this item, it's a dupe | 203 | // we have already seen this item, it's a dupe |
204 | qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); | 204 | qDebug( "%s is a dupe - ignoring...", (const char*) macaddr ); |
205 | return; | 205 | return; |
206 | } | 206 | } |
207 | } | 207 | } |
208 | else | 208 | else |
209 | { | 209 | { |
210 | s.sprintf( "(i) new network: '%s'", (const char*) essid ); | 210 | s.sprintf( "(i) new network: '%s'", (const char*) essid ); |
211 | logwindow->log( s ); | 211 | logwindow->log( s ); |
212 | 212 | ||
213 | network = new MScanListItem( netview, "networks", essid, QString::null, 0, 0, 0 ); | 213 | network = new MScanListItem( netview, "networks", essid, QString::null, 0, 0, 0 ); |
214 | } | 214 | } |
215 | 215 | ||
216 | 216 | ||
217 | // insert new station as child from network | 217 | // insert new station as child from network |
218 | 218 | ||
219 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? | 219 | // no essid to reduce clutter, maybe later we have a nick or stationname to display!? |
220 | 220 | ||
221 | qDebug( "inserting new station %s", (const char*) macaddr ); | 221 | qDebug( "inserting new station %s", (const char*) macaddr ); |
222 | 222 | ||
223 | new MScanListItem( network, type, "", macaddr, wep, channel, signal ); | 223 | new MScanListItem( network, type, "", macaddr, wep, channel, signal ); |
224 | 224 | ||
225 | if ( type == "managed" ) | 225 | if ( type == "managed" ) |
226 | { | 226 | { |
227 | s.sprintf( "(i) new AP in '%s' [%d]", (const char*) essid, channel ); | 227 | s.sprintf( "(i) new AP in '%s' [%d]", (const char*) essid, channel ); |
228 | } | 228 | } |
229 | else | 229 | else |
230 | { | 230 | { |
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control index 83bfd0e..f34cc08 100644 --- a/noncore/net/wellenreiter/opie-wellenreiter.control +++ b/noncore/net/wellenreiter/opie-wellenreiter.control | |||
@@ -1,9 +1,9 @@ | |||
1 | Files: bin/wellenreiter bin/wellenreiterd bin/orinoco_hopper pics/wellenreiter $QTDIR/lib/libwellenreiter.* | 1 | Files: bin/wellenreiter bin/wellenreiterd bin/orinoco_hopper pics/wellenreiter $QTDIR/lib/libwellenreiter.* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Michael Lauer <mickeyl@handhelds.org> | 4 | Maintainer: Michael Lauer <mickeyl@handhelds.org> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 6 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION), libpcap |
8 | Description: A wavelan network monitor | 8 | Description: A WaveLAN Network Monitor |
9 | A wavelan network monitor/sniffer for the Opie environment. | 9 | A WaveLAN Network Monitor/Sniffer for the Opie Environment. |