author | mickeyl <mickeyl> | 2002-12-08 18:41:47 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2002-12-08 18:41:47 (UTC) |
commit | 1a4f97b01412700aaa19fda396844fd237f35c92 (patch) (side-by-side diff) | |
tree | e439f505f73a71e179748aca0bcaa93d70b6f594 /noncore/net/wellenreiter/gui/wellenreiter.cpp | |
parent | ff55ff70dc982d070bb085acb96831ae30b30902 (diff) | |
download | opie-1a4f97b01412700aaa19fda396844fd237f35c92.zip opie-1a4f97b01412700aaa19fda396844fd237f35c92.tar.gz opie-1a4f97b01412700aaa19fda396844fd237f35c92.tar.bz2 |
- new networks finally show up in the GUI
- using OTabWidget instead of QTabWidget
- bugfixes
- preparing to fully integrate libwellenreiter
and the daemon into our buildsystem
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 693f20d..11cdaef 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -47,4 +47,4 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) qDebug( "D'oh! Could not get file descriptor for daemon-->gui communication socket." ); - //else - //startTimer( 700 ); + else + startTimer( 700 ); @@ -62,3 +62,3 @@ void Wellenreiter::handleMessage() qDebug( "received message from daemon." ); - + char buffer[128]; @@ -79,2 +79,4 @@ typedef struct { + qDebug( "Sniffer sent: '%s'", buffer ); + if ( result == NETFOUND ) /* new network found */ @@ -84,3 +86,7 @@ typedef struct { get_network_found( &n, (char*) &buffer ); - n.bssid[n.ssid_len] = "\0"; + + qDebug( "Sniffer said: net_type is %d.", n.net_type ); + qDebug( "Sniffer said: MAC is %s", (const char*) &n.mac ); + + //n.bssid[n.ssid_len] = "\0"; @@ -89,7 +95,7 @@ typedef struct { if ( n.net_type == 1 ) - type == "managed"; + type = "managed"; else - type == "adhoc"; - - addNewItem( type, n.bssid, n.mac, n.wep, n.channel, 0 ); + type = "adhoc"; + + addNewItem( type, n.bssid, QString( (const char*) &n.mac ), n.wep, n.channel, 0 ); @@ -116,3 +122,3 @@ bool Wellenreiter::hasMessage() tv.tv_sec = 0; - tv.tv_usec = 0; + tv.tv_usec = 10; int result = select( daemon_fd+1, &rfds, NULL, NULL, &tv ); @@ -123,3 +129,3 @@ void Wellenreiter::timerEvent( QTimerEvent* e ) { - //qDebug( "checking for message..." ); + qDebug( "checking for message..." ); @@ -131,3 +137,3 @@ void Wellenreiter::timerEvent( QTimerEvent* e ) { - //qDebug( "no message :(" ); + qDebug( "no message :(" ); } @@ -135,3 +141,3 @@ void Wellenreiter::timerEvent( QTimerEvent* e ) -void Wellenreiter::addNewItem( QString type, QString essid, QString ap, bool wep, int channel, int signal ) +void Wellenreiter::addNewItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) { @@ -151,3 +157,3 @@ void Wellenreiter::addNewItem( QString type, QString essid, QString ap, bool wep qDebug( "found!" ); - new MScanListItem( item, type, essid, ap, wep, channel, signal ); + new MScanListItem( item, type, essid, macaddr, wep, channel, signal ); } @@ -155,3 +161,3 @@ void Wellenreiter::addNewItem( QString type, QString essid, QString ap, bool wep { - new MScanListItem( netview, type, essid, ap, wep, channel, signal ); + new MScanListItem( netview, type, essid, macaddr, wep, channel, signal ); } |