author | mickeyl <mickeyl> | 2004-04-23 14:44:25 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-23 14:44:25 (UTC) |
commit | e4433b86449dab80f1a5303f9f5c86d3b9d138c7 (patch) (side-by-side diff) | |
tree | 5c15ddef0188d2240c7580346ee7c4028f3b01fa | |
parent | d8a8c7bf9559dd1ad6a72c9e5582d72a176c97f6 (diff) | |
download | opie-e4433b86449dab80f1a5303f9f5c86d3b9d138c7.zip opie-e4433b86449dab80f1a5303f9f5c86d3b9d138c7.tar.gz opie-e4433b86449dab80f1a5303f9f5c86d3b9d138c7.tar.bz2 |
gcc 3.4 fixlets
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index ed9ec14..c605111 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -444,67 +444,67 @@ MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const const QString& MScanListItem::essid() const { if ( type == "network" ) return _essid; else return ( (MScanListItem*) parent() )->essid(); } OListViewItem* MScanListItem::childFactory() { return new MScanListItem( this ); } void MScanListItem::serializeTo( QDataStream& s ) const { #ifdef DEBUG odebug << "serializing MScanListItem" << oendl; #endif OListViewItem::serializeTo( s ); s << _type; s << (Q_UINT8) ( _wep ? 'y' : 'n' ); } void MScanListItem::serializeFrom( QDataStream& s ) { #ifdef DEBUG odebug << "serializing MScanListItem" << oendl; #endif OListViewItem::serializeFrom( s ); - char wep; + Q_UINT8 wep; s >> _type; - s >> (Q_UINT8) wep; + s >> wep; _wep = (wep == 'y'); QString name; name.sprintf( "wellenreiter/%s", (const char*) _type ); setPixmap( col_type, Resource::loadPixmap( name ) ); if ( _wep ) setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! listView()->triggerUpdate(); } void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ) { #ifdef DEBUG qDebug( "decorating scanlist item %s / %s / %s [%d]", (const char*) type, (const char*) essid, (const char*) macaddr, channel ); #endif // set icon for managed or adhoc mode QString name; name.sprintf( "wellenreiter/%s", (const char*) type ); setPixmap( col_type, Resource::loadPixmap( name ) ); // special case for probed networks FIXME: This is ugly at present if ( type == "network" && probed ) { setPixmap( col_type, Resource::loadPixmap( "wellenreiter/network-probed.png" ) ); } // set icon for wep (wireless encryption protocol) diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 822bde8..40cd105 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -557,65 +557,65 @@ void Wellenreiter::startClicked() if ( QMessageBox::warning( this, "Wellenreiter II", tr( "Can't set interface '%1'\ninto monitor mode:\n" ).arg( iface->name() ) + strerror( errno ) + tr( "\nContinue with limited functionality?" ), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) return; } } // open GPS device if ( configwindow->enableGPS->isChecked() ) { odebug << "Wellenreiter:GPS enabled @ " << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl; gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); } // open pcap and start sniffing if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file? { dumpname = configwindow->captureFileName->text(); if ( dumpname.isEmpty() ) dumpname = "captureFile"; dumpname.append( '-' ); dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); dumpname.append( ".wellenreiter" ); } else // write it anyway ;) { dumpname = "/var/log/dump.wellenreiter"; } if ( cardtype != DEVTYPE_FILE ) pcap->open( interface ); else - pcap->open( QFile( interface ) ); + pcap->openCaptureFile( interface ); odebug << "Wellenreiter:: dumping to " << dumpname << "" << oendl; pcap->openDumpFile( dumpname ); if ( !pcap->isOpen() ) { QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg( cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) )); return; } // set capturer to non-blocking mode pcap->setBlocking( false ); // start channel hopper if ( cardtype != DEVTYPE_FILE ) { logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) ); iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window } if ( cardtype != DEVTYPE_FILE ) { // connect socket notifier and start channel hopper connect( pcap, SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) ); connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); } else { // start timer for reading packets startTimer( 100 ); } |