summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp8
-rw-r--r--noncore/settings/networksettings2/bluetooth/config.in2
-rw-r--r--noncore/settings/networksettings2/config.in2
-rw-r--r--noncore/settings/networksettings2/editconnection.cpp1
-rw-r--r--noncore/settings/networksettings2/gprs/GPRSrun.cpp8
-rw-r--r--noncore/settings/networksettings2/network/networkrun.cpp33
-rw-r--r--noncore/settings/networksettings2/networksettings.cpp6
-rw-r--r--noncore/settings/networksettings2/networksettings2/config.in2
-rw-r--r--noncore/settings/networksettings2/networksettings2/system.cpp16
-rw-r--r--noncore/settings/networksettings2/networksettings2/systemfile.cpp18
-rwxr-xr-xnoncore/settings/networksettings2/opie-networksettings2.postinst2
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTDevice.cpp6
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTDriver.cpp16
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTDriverList.cpp4
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.cpp14
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp14
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTInquiry.cpp18
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTPeer.cpp20
-rw-r--r--noncore/settings/networksettings2/opietooth2/Opietooth.cpp12
-rw-r--r--noncore/settings/networksettings2/opietooth2/config.in4
-rwxr-xr-xnoncore/settings/networksettings2/opietooth2/libopietooth2.postinst2
-rw-r--r--noncore/settings/networksettings2/opietooth2/opietooth2.pro7
-rw-r--r--noncore/settings/networksettings2/profile/profilerun.cpp2
-rw-r--r--noncore/settings/networksettings2/usb/usbrun.cpp43
24 files changed, 131 insertions, 129 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp
index ef6878a..3df7f5c 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothRFCOMMrun.cpp
@@ -26,3 +26,3 @@ State_t BluetoothRFCOMMRun::detectState( void ) {
- owarn << "Bluetooth "
+ odebug << "Bluetooth "
<< OT->isEnabled()
@@ -121,3 +121,3 @@ RFCOMMChannel * BluetoothRFCOMMRun::getChannel( void ) {
if( LB->isSelected(i) ) {
- owarn << "Selected " << Data->Devices[i]->Name << oendl;
+ odebug << "Selected " << Data->Devices[i]->Name << oendl;
Ch = Data->Devices[i];
@@ -149,3 +149,3 @@ int BluetoothRFCOMMRun::deviceNrOfConnection( void ) {
for( unsigned int i = 0; i < Data->Devices.count(); i ++ ) {
- owarn << "Check for rfcomm on "
+ odebug << "Check for rfcomm on "
<< Data->Devices[i]->BDAddress
@@ -157,3 +157,3 @@ int BluetoothRFCOMMRun::deviceNrOfConnection( void ) {
Data->Devices[i]->Channel ) ) >= 0 ) {
- owarn << "Up "
+ odebug << "Up "
<< oendl;
diff --git a/noncore/settings/networksettings2/bluetooth/config.in b/noncore/settings/networksettings2/bluetooth/config.in
index 398cff1..1a76f96 100644
--- a/noncore/settings/networksettings2/bluetooth/config.in
+++ b/noncore/settings/networksettings2/bluetooth/config.in
@@ -3,2 +3,2 @@
default "n" if NS2
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2CORE && NS2OPIETOOTH
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2CORE && NS2OPIETOOTH && LIBBLUEZ_DEP
diff --git a/noncore/settings/networksettings2/config.in b/noncore/settings/networksettings2/config.in
index d2b5f26..0236bab 100644
--- a/noncore/settings/networksettings2/config.in
+++ b/noncore/settings/networksettings2/config.in
@@ -5,3 +5,3 @@
config NS2
- boolean
+ boolean "opie-networksettings2 application"
default "y"
diff --git a/noncore/settings/networksettings2/editconnection.cpp b/noncore/settings/networksettings2/editconnection.cpp
index 0c3ead6..717d9e9 100644
--- a/noncore/settings/networksettings2/editconnection.cpp
+++ b/noncore/settings/networksettings2/editconnection.cpp
@@ -157,3 +157,2 @@ NodeCollection * EditConnection::getTmpCollection( void ) {
if( ! it ) {
- owarn << "Radio not selected" << oendl;
TmpIsValid = 0;
diff --git a/noncore/settings/networksettings2/gprs/GPRSrun.cpp b/noncore/settings/networksettings2/gprs/GPRSrun.cpp
index e842b99..cccc71a 100644
--- a/noncore/settings/networksettings2/gprs/GPRSrun.cpp
+++ b/noncore/settings/networksettings2/gprs/GPRSrun.cpp
@@ -25,3 +25,3 @@ State_t GPRSRun::detectState( void ) {
- owarn << "Check for ppp " << NC->name() << oendl;
+ odebug << "Check for ppp " << NC->name() << oendl;
if( D.exists( QString("ppp-")+removeSpaces(NC->name())+".pid") ) {
@@ -30,3 +30,3 @@ State_t GPRSRun::detectState( void ) {
- owarn << "PPP PID " << F.name() << oendl;
+ odebug << "PPP PID " << F.name() << oendl;
if( F.open( IO_ReadOnly ) ) {
@@ -45,3 +45,3 @@ State_t GPRSRun::detectState( void ) {
- owarn << "ppp running : IFace " << X << " = " << (long)I << oendl;
+ odebug << "ppp running : IFace " << X << " = " << (long)I << oendl;
@@ -90,3 +90,3 @@ QString GPRSRun::setMyState( NodeCollection * NC, Action_t A , bool ) {
NC->assignInterface( 0 );
- owarn << "ppp stopped " << oendl;
+ odebug << "ppp stopped " << oendl;
PPPPid = 0;
diff --git a/noncore/settings/networksettings2/network/networkrun.cpp b/noncore/settings/networksettings2/network/networkrun.cpp
index c17aa7f..2c93d9d 100644
--- a/noncore/settings/networksettings2/network/networkrun.cpp
+++ b/noncore/settings/networksettings2/network/networkrun.cpp
@@ -24,12 +24,15 @@ QString NetworkRun::setMyState( NodeCollection * NC, Action_t A, bool ) {
+ if( ! II ) {
+ Log(( "no interface assigned." ));
+ return QString();
+ }
+
+ QStringList SL;
+
if( A == Up ) {
// we can bring UP if lower level is available
- QStringList SL;
- SL << "ifup"
- << QString().sprintf( "%s=%s-c%d-allowed",
- II->Name.latin1(), II->Name.latin1(),
- nodeCollection()->number() );
- if( ! NSResources->system().runAsRoot( SL ) ) {
- return QString("Cannot call %1").arg(SL.join(" "));
- }
+ SL << "ifup";
+ } else if( A == Down ) {
+ SL << "ifdown";
+ } else {
return QString();
@@ -37,7 +40,6 @@ QString NetworkRun::setMyState( NodeCollection * NC, Action_t A, bool ) {
- if( A == Down ) {
- QStringList SL;
- if( II ) {
- SL << "ifdown"
- << II->Name.latin1();
+ SL << QString().sprintf( "%s=%s-c%d-allowed",
+ II->Name.latin1(), II->Name.latin1(),
+ nodeCollection()->number() );
+
if( ! NSResources->system().runAsRoot( SL ) ) {
@@ -45,6 +47,3 @@ QString NetworkRun::setMyState( NodeCollection * NC, Action_t A, bool ) {
}
- } else {
- Log(( "no interface assigned." ));
- }
- }
+
return QString();
diff --git a/noncore/settings/networksettings2/networksettings.cpp b/noncore/settings/networksettings2/networksettings.cpp
index 9680a96..78b6cce 100644
--- a/noncore/settings/networksettings2/networksettings.cpp
+++ b/noncore/settings/networksettings2/networksettings.cpp
@@ -111,5 +111,3 @@ NetworkSettings::~NetworkSettings() {
- owarn << "Dispose NS" << oendl;
if( NSD.isModified() ) {
- owarn << "Modified" << oendl;
S = NSD.saveSettings();
@@ -288,3 +286,2 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
- owarn << "State " << NC->state() << oendl;
switch( NC->state() ) {
@@ -293,3 +290,2 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
FrmActive = 0;
- owarn << "LEds " << leds << oendl;
break;
@@ -361,3 +357,3 @@ void NetworkSettings::SLOT_Disable( bool T ) {
- owarn << "Prepare to disable" << oendl;
+ Log(( "Prepare to %sable\n", (T) ? "en" : "dis" ));
Msg = NC->setState( (T) ? Disable : Enable );
diff --git a/noncore/settings/networksettings2/networksettings2/config.in b/noncore/settings/networksettings2/networksettings2/config.in
index b384e18..56e971e 100644
--- a/noncore/settings/networksettings2/networksettings2/config.in
+++ b/noncore/settings/networksettings2/networksettings2/config.in
@@ -1,3 +1,3 @@
config NS2CORE
- boolean "opie-networksettings2 (TCP/IP network settings)"
+ boolean "opie-networksettings2 library"
default "y"
diff --git a/noncore/settings/networksettings2/networksettings2/system.cpp b/noncore/settings/networksettings2/networksettings2/system.cpp
index e642c08..f027d35 100644
--- a/noncore/settings/networksettings2/networksettings2/system.cpp
+++ b/noncore/settings/networksettings2/networksettings2/system.cpp
@@ -74,3 +74,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
if( getenv( "NS2TESTMODE" ) ) {
- owarn << "TESTMODE !!! execute "
+ odebug << "TESTMODE !!! execute "
<< S.join( " ")
@@ -108,3 +108,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
OProcess::AllOutput ) ) {
- owarn << "Error starting " << S << oendl;
+ odebug << "Error starting " << S << oendl;
if( ! Prc )
@@ -114,3 +114,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
}
- owarn << "Started " << S << oendl;
+ odebug << "Started " << S << oendl;
}
@@ -272,3 +272,3 @@ void System::probeInterfaces( void ) {
if(sockfd == -1) {
- owarn << "Cannot open INET socket "
+ odebug << "Cannot open INET socket "
<< errno
@@ -284,3 +284,3 @@ void System::probeInterfaces( void ) {
if( ! ProcDevNet->open(IO_ReadOnly) ) {
- owarn << "Cannot open "
+ odebug << "Cannot open "
<< PROCNETDEV
@@ -511,3 +511,3 @@ QString removeSpaces( const QString & X ) {
Y.replace( QRegExp(" "), "_" );
- owarn << X << " **" << Y << "**" << oendl;
+ odebug << X << " **" << Y << "**" << oendl;
return Y;
@@ -550,3 +550,3 @@ void MyProcess::SLOT_Stdout( Opie::Core::OProcess * , char * Buf, int len ) {
- owarn << "Received " << len << " bytes on stdout" << oendl;
+ odebug << "Received " << len << " bytes on stdout" << oendl;
// see if we have some lines (allow empty lines)
@@ -571,3 +571,3 @@ void MyProcess::SLOT_Stderr( Opie::Core::OProcess * , char * Buf, int len ) {
- owarn << "Received " << len << " bytes on stderr" << oendl;
+ odebug << "Received " << len << " bytes on stderr" << oendl;
// see if we have some lines (allow empty lines)
diff --git a/noncore/settings/networksettings2/networksettings2/systemfile.cpp b/noncore/settings/networksettings2/networksettings2/systemfile.cpp
index 8deef94..1b1988e 100644
--- a/noncore/settings/networksettings2/networksettings2/systemfile.cpp
+++ b/noncore/settings/networksettings2/networksettings2/systemfile.cpp
@@ -101,12 +101,12 @@ bool SystemFile::open( void ) {
if( ! F ) {
- owarn << "!!!!!!!!!!!!!!!!!! " << oendl;
- owarn << "!!!! TESTMODE !!!!" << oendl;
- owarn << "!!!!!!!!!!!!!!!!!! " << oendl;
- owarn << "!!!!" << oendl;
- owarn << "!!!! GENERATE " << Path << oendl;
+ odebug << "!!!!!!!!!!!!!!!!!! " << oendl;
+ odebug << "!!!! TESTMODE !!!!" << oendl;
+ odebug << "!!!!!!!!!!!!!!!!!! " << oendl;
+ odebug << "!!!!" << oendl;
+ odebug << "!!!! GENERATE " << Path << oendl;
if( InAppend ) {
- owarn << "!!!! In APPEND mode" << oendl;
+ odebug << "!!!! In APPEND mode" << oendl;
}
- owarn << "!!!!" << oendl;
- owarn << "!!!!!!!!!!!!!!!!!!" << oendl;
+ odebug << "!!!!" << oendl;
+ odebug << "!!!!!!!!!!!!!!!!!!" << oendl;
@@ -138,3 +138,3 @@ bool SystemFile::close( void ) {
if( ! InAppend ) {
- owarn << "Rename " << OldP << " to " << Path << oendl;
+ odebug << "Rename " << OldP << " to " << Path << oendl;
return ( rename( OldP.latin1(), Path.latin1() ) >= 0 );
diff --git a/noncore/settings/networksettings2/opie-networksettings2.postinst b/noncore/settings/networksettings2/opie-networksettings2.postinst
index ce43274..d1d98ac 100755
--- a/noncore/settings/networksettings2/opie-networksettings2.postinst
+++ b/noncore/settings/networksettings2/opie-networksettings2.postinst
@@ -6,3 +6,3 @@ QTPB=/opt/QtPalmtop/bin
-qcop QPE/TaskBar "reloadApps()"
+${QTPB}/qcop QPE/TaskBar "reloadApps()"
diff --git a/noncore/settings/networksettings2/opietooth2/OTDevice.cpp b/noncore/settings/networksettings2/opietooth2/OTDevice.cpp
index 62f17a0..c6f7d5e 100644
--- a/noncore/settings/networksettings2/opietooth2/OTDevice.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTDevice.cpp
@@ -105,3 +105,3 @@ bool OTDevice::detach(){
if( kill( m_hciattachPid, 9) < 0 ) {
- owarn << "could not stop " << errno << oendl;
+ odebug << "could not stop " << errno << oendl;
emit error( tr( "Could not stop process" ) );
@@ -170,3 +170,3 @@ void OTDevice::slotStdErr(OProcess* proc, char* chars, int len) {
m_output.append( string.data() );
- owarn << m_output << oendl;
+ odebug << m_output << oendl;
}
@@ -213,3 +213,3 @@ void OTDevice::detectDeviceType( QString & Device,
// detect device type and determine parms
- owarn << "Detecting device" << oendl;
+ odebug << "Detecting device" << oendl;
switch ( ODevice::inst()->model() ) {
diff --git a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp
index 8bd7919..a7ee662 100644
--- a/noncore/settings/networksettings2/opietooth2/OTDriver.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTDriver.cpp
@@ -152,3 +152,3 @@ OTDriver::OTDriver( OTGateway * _OT, struct hci_dev_info* di) : QObject( _OT ),
init(di);
- owarn << "Driver " << devname() << oendl;
+ odebug << "Driver " << devname() << oendl;
@@ -387,3 +387,3 @@ void OTDriver::bringUp() {
- owarn << "bringUp : " << Dev << oendl;
+ odebug << "bringUp : " << Dev << oendl;
@@ -410,3 +410,3 @@ void OTDriver::bringDown() {
- owarn << "bringDown : " << Dev << oendl;
+ odebug << "bringDown : " << Dev << oendl;
@@ -663,3 +663,3 @@ OTHCISocket * OTDriver::openSocket( void ) {
if( ! Socket ) {
- owarn << "Open HCI socket to " << devname() << oendl;
+ odebug << "Open HCI socket to " << devname() << oendl;
Socket = new OTHCISocket( this );
@@ -671,3 +671,3 @@ void OTDriver::closeSocket( void ) {
if( Socket ) {
- owarn << "Close HCI socket to " << devname() << oendl;
+ odebug << "Close HCI socket to " << devname() << oendl;
delete Socket;
@@ -715,3 +715,3 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) {
if (ioctl( fd(), HCIGETCONNINFO, (unsigned long) cr) < 0) {
- owarn << "Get connection info failed" << oendl;
+ odebug << "Get connection info failed" << oendl;
free(cr);
@@ -733,3 +733,3 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) {
if (hci_send_req( fd(), &rq, 100) < 0) {
- owarn << "Get connection info failed" << oendl;
+ odebug << "Get connection info failed" << oendl;
return 0;
@@ -738,3 +738,3 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) {
if( rp.status ) {
- owarn << QString().sprintf("HCI get_link_quality cmd failed (0x%2.2X)", rp.status) << oendl;
+ odebug << QString().sprintf("HCI get_link_quality cmd failed (0x%2.2X)", rp.status) << oendl;
return 0;
diff --git a/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp b/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp
index f703834..e5af742 100644
--- a/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTDriverList.cpp
@@ -55,3 +55,3 @@ void OTDriverList::update() {
if( ioctl( OT->getSocket(), HCIGETDEVLIST, (void*)dl) ) {
- owarn << "WARNING : cannot read device list. "
+ odebug << "WARNING : cannot read device list. "
<< errno
@@ -81,3 +81,3 @@ void OTDriverList::update() {
- owarn << "Found " << count() << " devices" << oendl;
+ odebug << "Found " << count() << " devices" << oendl;
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
index 6531cf6..e8137dd 100644
--- a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
@@ -156,3 +156,3 @@ void OTGateway::SLOT_ShowError( const QString & S ) {
- owarn << S << oendl;
+ odebug << S << oendl;
@@ -212,3 +212,3 @@ void OTGateway::timerEvent( QTimerEvent * ) {
void OTGateway::SLOT_Enabled( int id, bool Up ) {
- owarn << "device " << id << " state " << Up << oendl;
+ odebug << "device " << id << " state " << Up << oendl;
if( Up ) {
@@ -229,3 +229,3 @@ void OTGateway::updateDrivers( void ) {
- owarn << "updated drivers. now " << AllDrivers.count() << oendl;
+ odebug << "updated drivers. now " << AllDrivers.count() << oendl;
@@ -267,3 +267,3 @@ void OTGateway::updateDrivers( void ) {
void OTGateway::SLOT_DriverDisappeared( OTDriver * D ) {
- owarn << "Driver " << D->devname() << " when offline" << oendl;
+ odebug << "Driver " << D->devname() << " when offline" << oendl;
updateDrivers();
@@ -320,3 +320,3 @@ void OTGateway::SLOT_PeerDetected( OTPeer * P, bool IsNew ) {
// new peer
- owarn << "New peer " << P->name() << oendl;
+ odebug << "New peer " << P->name() << oendl;
addPeer( P );
@@ -386,3 +386,3 @@ PANConnectionVector OTGateway::getPANConnections( void ) {
if (ctl < 0) {
- owarn << "Failed to open control socket" << oendl;
+ odebug << "Failed to open control socket" << oendl;
return V;
@@ -393,3 +393,3 @@ PANConnectionVector OTGateway::getPANConnections( void ) {
if (ioctl(ctl, BNEPGETCONNLIST, &req)) {
- owarn << "Failed to get connection list" << oendl;
+ odebug << "Failed to get connection list" << oendl;
::close( ctl );
diff --git a/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp b/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp
index 471c3bf..1997b44 100644
--- a/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp
@@ -36,3 +36,3 @@ OTHCISocket::~OTHCISocket() {
void OTHCISocket::close() {
- owarn << "OTHCISocket::close()" << oendl;
+ odebug << "OTHCISocket::close()" << oendl;
if( HCIReadNotifier ) {
@@ -48,3 +48,3 @@ bool OTHCISocket::open() {
- owarn << "OTHCISocket::open()" << oendl;
+ odebug << "OTHCISocket::open()" << oendl;
int s;
@@ -153,3 +153,3 @@ void OTHCISocket::slotSocketActivated() {
} else {
- owarn << "Error reading hci packet: packetSize("
+ odebug << "Error reading hci packet: packetSize("
<< psize
@@ -185,3 +185,3 @@ void OTHCISocket::updateStatus(const QByteArray& data) {
void OTHCISocket::slotConnectionClosed() {
- owarn << "HCI connection closed." << oendl;
+ odebug << "HCI connection closed." << oendl;
emit connectionClosed();
@@ -232,3 +232,3 @@ bool OTHCISocket::readStatus( unsigned char ogf,
- owarn << "OTHCISocket::readStatus()" << oendl;
+ odebug << "OTHCISocket::readStatus()" << oendl;
bool timeout = false;
@@ -248,3 +248,3 @@ bool OTHCISocket::readStatus( unsigned char ogf,
*status = LastStatus;
- owarn << "OTHCISocket::readStatus(ogf="
+ odebug << "OTHCISocket::readStatus(ogf="
<< ogf
@@ -260,3 +260,3 @@ bool OTHCISocket::readStatus( unsigned char ogf,
- owarn << "OTHCISocket::readStatus(ogf="
+ odebug << "OTHCISocket::readStatus(ogf="
<< ogf
diff --git a/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp b/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp
index 8e94bbc..2bc63c7 100644
--- a/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTInquiry.cpp
@@ -61,3 +61,3 @@ void OTInquiry::stopInquiring( void ) {
if( Socket ) {
- owarn << "Stop inquiry" << oendl;
+ odebug << "Stop inquiry" << oendl;
Driver->closeSocket();
@@ -77,3 +77,3 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) {
- owarn << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl;
+ odebug << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl;
@@ -91,3 +91,3 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) {
QString S =QString().sprintf( "%x", status );
- owarn << "OTInquiry::inquiry() failed: 0x" << S << oendl;
+ odebug << "OTInquiry::inquiry() failed: 0x" << S << oendl;
emit finished();
@@ -96,3 +96,3 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) {
} else {
- owarn << "OTInquiry::inquiry(): Timeout." << oendl;
+ odebug << "OTInquiry::inquiry(): Timeout." << oendl;
return false;
@@ -128,3 +128,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
- owarn << "OTInquiry: hci packet received: eventCode="
+ odebug << "OTInquiry: hci packet received: eventCode="
<< (unsigned int)eventCode
@@ -138,3 +138,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
{ unsigned char status = data[0];
- owarn << "EVT_INQUIRY_COMPLETE status=" << status << oendl;
+ odebug << "EVT_INQUIRY_COMPLETE status=" << status << oendl;
InquiryTimeoutTimer->stop();
@@ -142,3 +142,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
if( SuccessfullyStarted == true) {
- owarn << "OTInquiry ended successfully" << oendl;
+ odebug << "OTInquiry ended successfully" << oendl;
SuccessfullyEnded = true;
@@ -165,3 +165,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
- owarn << "INQUIRY_RESULT: "
+ odebug << "INQUIRY_RESULT: "
<< Addr.toString()
@@ -205,3 +205,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
int cmdOpcode = *((uint16_t*)(data+2));
- owarn << "EVT_CMD_STATUS status="
+ odebug << "EVT_CMD_STATUS status="
<< status
diff --git a/noncore/settings/networksettings2/opietooth2/OTPeer.cpp b/noncore/settings/networksettings2/opietooth2/OTPeer.cpp
index 0d7e943..2272f04 100644
--- a/noncore/settings/networksettings2/opietooth2/OTPeer.cpp
+++ b/noncore/settings/networksettings2/opietooth2/OTPeer.cpp
@@ -53,3 +53,3 @@ void OTPeer::updateServices( void ) {
- owarn << "Get services from " << Addr.toString() << oendl;
+ odebug << "Get services from " << Addr.toString() << oendl;
@@ -60,3 +60,3 @@ void OTPeer::updateServices( void ) {
if (!session) {
- owarn << "sdp_connect("
+ odebug << "sdp_connect("
<< Addr.toString()
@@ -82,3 +82,3 @@ void OTPeer::updateServices( void ) {
&seq ) ) {
- owarn << "Service Search failed" << oendl;
+ odebug << "Service Search failed" << oendl;
sdp_close(session);
@@ -179,3 +179,3 @@ void OTPeer::findOutState( int timeoutInSec, bool Force ) {
ProbeTimeout = timeoutInSec*1000;
- owarn << "Ping " << address().toString() << oendl;
+ odebug << "Ping " << address().toString() << oendl;
startTimer( POLLDELAY );
@@ -237,3 +237,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
if( (n = ::poll(pf, 1, 0)) < 0 ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
@@ -268,3 +268,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
// but it is UP
- owarn << address().toString()
+ odebug << address().toString()
<< " good send error "
@@ -278,3 +278,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
} else if( errno != EBUSY ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
@@ -301,3 +301,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
if( (n = ::poll(pf, 1, 0)) < 0 ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
@@ -317,3 +317,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
if( (n = ::recv( ProbeFD, buf, sizeof(buf), 0)) < 0) {
- owarn << address().toString()
+ odebug << address().toString()
<< "errno "
@@ -332,3 +332,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
- owarn << "reply from "
+ odebug << "reply from "
<< address().toString()
diff --git a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
index b14cc2f..8323549 100644
--- a/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
+++ b/noncore/settings/networksettings2/opietooth2/Opietooth.cpp
@@ -539,3 +539,3 @@ void OTScan::SLOT_Selected( QListViewItem * it ) {
}
- owarn << "Selected " << SelectedPeer->address().toString() <<
+ odebug << "Selected " << SelectedPeer->address().toString() <<
" Channel " << SelectedChannel << oendl;
@@ -567,3 +567,3 @@ void OTScan::SLOT_CleanupOld( ) {
// part of linkkey
- owarn << "LINKKEY " << TheP->address().toString() << oendl;
+ odebug << "LINKKEY " << TheP->address().toString() << oendl;
break;
@@ -573,3 +573,3 @@ void OTScan::SLOT_CleanupOld( ) {
if( k == Keys.count() ) {
- owarn << "RM LINKKEY " << TheP->address().toString() << oendl;
+ odebug << "RM LINKKEY " << TheP->address().toString() << oendl;
// not found -> remember to remove this peer
@@ -583,3 +583,3 @@ void OTScan::SLOT_CleanupOld( ) {
} else {
- owarn << "NODOWN " << TheP->address().toString() << oendl;
+ odebug << "NODOWN " << TheP->address().toString() << oendl;
}
@@ -608,3 +608,3 @@ void OTScan::SLOT_NewPeer( OTPeer * P, bool IsNew ){
if( ! it ) {
- owarn << "Should not occur" << oendl;
+ odebug << "Should not occur" << oendl;
return;
@@ -931,3 +931,3 @@ void OTManage::SLOT_UpDriver( bool Up ) {
OTDriver * D = ((DriverLVI *)it)->driver();
- owarn << "UP driver " << D->devname() << oendl;
+ odebug << "UP driver " << D->devname() << oendl;
// this
diff --git a/noncore/settings/networksettings2/opietooth2/config.in b/noncore/settings/networksettings2/opietooth2/config.in
index 720f49a..084e8c0 100644
--- a/noncore/settings/networksettings2/opietooth2/config.in
+++ b/noncore/settings/networksettings2/opietooth2/config.in
@@ -1,5 +1,5 @@
config NS2OPIETOOTH
- boolean "opie-networksettings2 bluetooth library"
+ boolean "Opietooth2 bluetooth library"
default "y"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBBLUEZ_DEP && NS2CORE
diff --git a/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst b/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst
index cd605c2..2713c61 100755
--- a/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst
+++ b/noncore/settings/networksettings2/opietooth2/libopietooth2.postinst
@@ -7,3 +7,3 @@ QTPB=/opt/QtPalmtop/bin
# qcop QPE/Taskbar "linkChanged(opietooth)"
-qcop QPE/Taskbar "reloadApps()"
+${QTPB}/qcop QPE/Taskbar "reloadApps()"
diff --git a/noncore/settings/networksettings2/opietooth2/opietooth2.pro b/noncore/settings/networksettings2/opietooth2/opietooth2.pro
index e0057a9..16277cf 100644
--- a/noncore/settings/networksettings2/opietooth2/opietooth2.pro
+++ b/noncore/settings/networksettings2/opietooth2/opietooth2.pro
@@ -37 +37,8 @@ VERSION = 1.0.0
include ( $(OPIEDIR)/include.pro )
+
+!isEmpty( LIBBLUEZ_INC_DIR ) {
+ INCLUDEPATH += $$LIBBLUEZ_INC_DIR
+}
+!isEmpty( LIBBLUEZ_LIB_DIR ) {
+ LIBS += -L$$LIBBLUEZ_LIB_DIR
+}
diff --git a/noncore/settings/networksettings2/profile/profilerun.cpp b/noncore/settings/networksettings2/profile/profilerun.cpp
index ab57a00..acb67bd 100644
--- a/noncore/settings/networksettings2/profile/profilerun.cpp
+++ b/noncore/settings/networksettings2/profile/profilerun.cpp
@@ -12,3 +12,3 @@ State_t ProfileRun::detectState( void ) {
QString ProfileRun::setMyState( NodeCollection * NC, Action_t A, bool ) {
- owarn << "Profile " << Data->Disabled << oendl;
+ odebug << "Profile " << Data->Disabled << oendl;
if( A == Disable ) {
diff --git a/noncore/settings/networksettings2/usb/usbrun.cpp b/noncore/settings/networksettings2/usb/usbrun.cpp
index eb439c1..de8c8a2 100644
--- a/noncore/settings/networksettings2/usb/usbrun.cpp
+++ b/noncore/settings/networksettings2/usb/usbrun.cpp
@@ -40,2 +40,3 @@ State_t USBRun::detectState( void ) {
Log(("Assigned %p\n", NC->assignedInterface() ));
+
if( ( Run = NC->assignedInterface() ) ) {
@@ -52,17 +53,3 @@ State_t USBRun::detectState( void ) {
// find possible interface
- for( QDictIterator<InterfaceInfo> It(Sys.interfaces());
- It.current();
- ++It ) {
- Run = It.current();
-
- Log(("%s %d %d=%d %d\n",
- Run->Name.latin1(),
- handlesInterface( Run->Name ),
- Run->CardType, ARPHRD_ETHER,
- ! Run->IsUp ));
-
- if( handlesInterface( Run->Name ) &&
- Run->CardType == ARPHRD_ETHER &&
- ! Run->IsUp
- ) {
+ if( getInterface() ) {
// proper type, and Not UP -> free
@@ -72,3 +59,2 @@ State_t USBRun::detectState( void ) {
}
- }
@@ -79,4 +65,12 @@ QString USBRun::setMyState( NodeCollection * NC, Action_t A, bool ) {
- // nothing needs to be done to 'activate' or 'deactivate'
- // a cable
+ InterfaceInfo * I = getInterface();
+
+ if( ! I ) {
+ return QString("No usb device available");
+ }
+
+ Log(( "Grabbed USB interface %s\n", I->Name.latin1() ));
+ // grab this interface
+ NC->assignInterface( I );
+
return QString();
@@ -89,3 +83,2 @@ InterfaceInfo * USBRun::getInterface( void ) {
InterfaceInfo * best = 0, * Run;
- QRegExp R( "usb[0-9abcdef]" );
@@ -95,2 +88,9 @@ InterfaceInfo * USBRun::getInterface( void ) {
Run = It.current();
+
+ Log(("%s %d %d=%d %d\n",
+ Run->Name.latin1(),
+ handlesInterface( Run->Name ),
+ Run->CardType, ARPHRD_ETHER,
+ ! Run->IsUp ));
+
if( handlesInterface( Run->Name ) &&
@@ -102,6 +102,7 @@ InterfaceInfo * USBRun::getInterface( void ) {
return Run;
- } else if( Run->assignedConnection() == 0 ) {
+ } else if( ! Run->IsUp &&
+ Run->assignedConnection() == 0 ) {
// free
best = Run;
- }
+ } // UP or not assigned to us
}