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
@@ -25,5 +25,5 @@ State_t BluetoothRFCOMMRun::detectState( void ) {
}
- owarn << "Bluetooth "
+ odebug << "Bluetooth "
<< OT->isEnabled()
<< oendl;
@@ -120,5 +120,5 @@ RFCOMMChannel * BluetoothRFCOMMRun::getChannel( void ) {
for( i = 0; i < Data->Devices.count(); i ++ ) {
if( LB->isSelected(i) ) {
- owarn << "Selected " << Data->Devices[i]->Name << oendl;
+ odebug << "Selected " << Data->Devices[i]->Name << oendl;
Ch = Data->Devices[i];
break;
@@ -148,5 +148,5 @@ int BluetoothRFCOMMRun::deviceNrOfConnection( void ) {
DeviceNr = -1;
for( unsigned int i = 0; i < Data->Devices.count(); i ++ ) {
- owarn << "Check for rfcomm on "
+ odebug << "Check for rfcomm on "
<< Data->Devices[i]->BDAddress
<< " "
@@ -156,5 +156,5 @@ int BluetoothRFCOMMRun::deviceNrOfConnection( void ) {
OTDeviceAddress( Data->Devices[i]->BDAddress ),
Data->Devices[i]->Channel ) ) >= 0 ) {
- owarn << "Up "
+ odebug << "Up "
<< oendl;
break;
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
@@ -2,3 +2,3 @@
boolean "opie-networksettings2plugin-bluetooth (set up BLUETOOTH)"
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
@@ -4,5 +4,5 @@
config NS2
- boolean
+ boolean "opie-networksettings2 application"
default "y"
depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2CORE && NS2OPIETOOTH
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
@@ -156,5 +156,4 @@ NodeCollection * EditConnection::getTmpCollection( void ) {
if( ! it ) {
- owarn << "Radio not selected" << oendl;
TmpIsValid = 0;
return 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
@@ -24,10 +24,10 @@ State_t GPRSRun::detectState( void ) {
// check ppp itself and figure out interface
- owarn << "Check for ppp " << NC->name() << oendl;
+ odebug << "Check for ppp " << NC->name() << oendl;
if( D.exists( QString("ppp-")+removeSpaces(NC->name())+".pid") ) {
// get pid and check if pppd is still running
QFile F( D.path()+"/ppp-"+removeSpaces(NC->name())+".pid");
- owarn << "PPP PID " << F.name() << oendl;
+ odebug << "PPP PID " << F.name() << oendl;
if( F.open( IO_ReadOnly ) ) {
QTextStream TS(&F);
@@ -44,5 +44,5 @@ State_t GPRSRun::detectState( void ) {
I = NSResources->system().findInterface(X);
- owarn << "ppp running : IFace " << X << " = " << (long)I << oendl;
+ odebug << "ppp running : IFace " << X << " = " << (long)I << oendl;
if( I ) {
@@ -89,5 +89,5 @@ 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
@@ -23,29 +23,28 @@ QString NetworkRun::setMyState( NodeCollection * NC, Action_t A, bool ) {
InterfaceInfo * II = NC->assignedInterface();
+ 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();
}
- 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 ) ) {
return QString( "Cannot call %1" ).arg( SL.join( " " ));
}
- } 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
@@ -110,7 +110,5 @@ NetworkSettings::~NetworkSettings() {
QString S;
- owarn << "Dispose NS" << oendl;
if( NSD.isModified() ) {
- owarn << "Modified" << oendl;
S = NSD.saveSettings();
if( ! S.isEmpty() ) {
@@ -287,10 +285,8 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) {
int leds = 0;
- owarn << "State " << NC->state() << oendl;
switch( NC->state() ) {
case Disabled : // no further work
IsEnabled = 0;
FrmActive = 0;
- owarn << "LEds " << leds << oendl;
break;
case Unknown :
@@ -360,5 +356,5 @@ void NetworkSettings::SLOT_Disable( bool T ) {
NodeCollection * NC = NSResources->findConnection( LBI->text() );
- owarn << "Prepare to disable" << oendl;
+ Log(( "Prepare to %sable\n", (T) ? "en" : "dis" ));
Msg = NC->setState( (T) ? Disable : Enable );
if( ! Msg.isEmpty() ) {
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,4 +1,4 @@
config NS2CORE
- boolean "opie-networksettings2 (TCP/IP network settings)"
+ boolean "opie-networksettings2 library"
default "y"
depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI
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
@@ -73,5 +73,5 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
if( getenv( "NS2TESTMODE" ) ) {
- owarn << "TESTMODE !!! execute "
+ odebug << "TESTMODE !!! execute "
<< S.join( " ")
<< oendl;
@@ -107,5 +107,5 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
if( ! P->process().start( OProcess::DontCare,
OProcess::AllOutput ) ) {
- owarn << "Error starting " << S << oendl;
+ odebug << "Error starting " << S << oendl;
if( ! Prc )
delete P;
@@ -113,5 +113,5 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) {
return 0;
}
- owarn << "Started " << S << oendl;
+ odebug << "Started " << S << oendl;
}
@@ -271,5 +271,5 @@ void System::probeInterfaces( void ) {
sockfd = socket(PF_INET, SOCK_DGRAM, 0);
if(sockfd == -1) {
- owarn << "Cannot open INET socket "
+ odebug << "Cannot open INET socket "
<< errno
<< " "
@@ -283,5 +283,5 @@ void System::probeInterfaces( void ) {
ProcDevNet = new QFile(PROCNETDEV);
if( ! ProcDevNet->open(IO_ReadOnly) ) {
- owarn << "Cannot open "
+ odebug << "Cannot open "
<< PROCNETDEV
<< " "
@@ -510,5 +510,5 @@ QString removeSpaces( const QString & X ) {
Y = X.simplifyWhiteSpace();
Y.replace( QRegExp(" "), "_" );
- owarn << X << " **" << Y << "**" << oendl;
+ odebug << X << " **" << Y << "**" << oendl;
return Y;
}
@@ -549,5 +549,5 @@ void MyProcess::SLOT_Stdout( Opie::Core::OProcess * , char * Buf, int len ) {
StdoutBuffer += LB;
- owarn << "Received " << len << " bytes on stdout" << oendl;
+ odebug << "Received " << len << " bytes on stdout" << oendl;
// see if we have some lines (allow empty lines)
QStringList SL = QStringList::split( "\n", StdoutBuffer, TRUE );
@@ -570,5 +570,5 @@ void MyProcess::SLOT_Stderr( Opie::Core::OProcess * , char * Buf, int len ) {
StderrBuffer += LB;
- owarn << "Received " << len << " bytes on stderr" << oendl;
+ odebug << "Received " << len << " bytes on stderr" << oendl;
// see if we have some lines (allow empty lines)
QStringList SL = QStringList::split( "\n", StderrBuffer, TRUE );
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
@@ -100,14 +100,14 @@ bool SystemFile::open( void ) {
} else {
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;
F = new QFile();
@@ -137,5 +137,5 @@ 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
@@ -5,5 +5,5 @@ QTPB=/opt/QtPalmtop/bin
[ ! -L ${QTPB}/networksettings2-request ] && ln -sf ${QTPB}/networksettings2 ${QTPB}/networksettings2-request
-qcop QPE/TaskBar "reloadApps()"
+${QTPB}/qcop QPE/TaskBar "reloadApps()"
exit 0
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
@@ -104,5 +104,5 @@ 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" ) );
return FALSE;
@@ -169,5 +169,5 @@ void OTDevice::slotStdErr(OProcess* proc, char* chars, int len) {
QString m_output;
m_output.append( string.data() );
- owarn << m_output << oendl;
+ odebug << m_output << oendl;
}
}
@@ -212,5 +212,5 @@ void OTDevice::detectDeviceType( QString & Device,
// detect device type and determine parms
- owarn << "Detecting device" << oendl;
+ odebug << "Detecting device" << oendl;
switch ( ODevice::inst()->model() ) {
case Model_iPAQ_H39xx:
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
@@ -151,5 +151,5 @@ OTDriver::OTDriver( OTGateway * _OT, struct hci_dev_info* di) : QObject( _OT ),
init(di);
- owarn << "Driver " << devname() << oendl;
+ odebug << "Driver " << devname() << oendl;
AutoClose = new QTimer( this );
@@ -386,5 +386,5 @@ void OTDriver::setUp( bool M ) {
void OTDriver::bringUp() {
- owarn << "bringUp : " << Dev << oendl;
+ odebug << "bringUp : " << Dev << oendl;
if( ! open() ) {
@@ -409,5 +409,5 @@ void OTDriver::bringUp() {
void OTDriver::bringDown() {
- owarn << "bringDown : " << Dev << oendl;
+ odebug << "bringDown : " << Dev << oendl;
if( ! open() ) {
@@ -662,5 +662,5 @@ void OTDriver::setManufacturer(int compid) {
OTHCISocket * OTDriver::openSocket( void ) {
if( ! Socket ) {
- owarn << "Open HCI socket to " << devname() << oendl;
+ odebug << "Open HCI socket to " << devname() << oendl;
Socket = new OTHCISocket( this );
}
@@ -670,5 +670,5 @@ OTHCISocket * OTDriver::openSocket( void ) {
void OTDriver::closeSocket( void ) {
if( Socket ) {
- owarn << "Close HCI socket to " << devname() << oendl;
+ odebug << "Close HCI socket to " << devname() << oendl;
delete Socket;
Socket = 0;
@@ -714,5 +714,5 @@ 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);
return 0;
@@ -732,10 +732,10 @@ 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;
}
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
@@ -54,5 +54,5 @@ void OTDriverList::update() {
if( ioctl( OT->getSocket(), HCIGETDEVLIST, (void*)dl) ) {
- owarn << "WARNING : cannot read device list. "
+ odebug << "WARNING : cannot read device list. "
<< errno
<< strerror( errno ) << oendl;
@@ -80,5 +80,5 @@ void OTDriverList::update() {
}
- owarn << "Found " << count() << " devices" << oendl;
+ odebug << "Found " << count() << " devices" << oendl;
::free( dl );
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
@@ -155,5 +155,5 @@ bool OTGateway::isEnabled() {
void OTGateway::SLOT_ShowError( const QString & S ) {
- owarn << S << oendl;
+ odebug << S << oendl;
if( ErrorConnectCount > 0 ) {
@@ -211,5 +211,5 @@ 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 ) {
// device is up -> detect it
@@ -228,5 +228,5 @@ void OTGateway::updateDrivers( void ) {
AllDrivers.update();
- owarn << "updated drivers. now " << AllDrivers.count() << oendl;
+ odebug << "updated drivers. now " << AllDrivers.count() << oendl;
// connect signals for each driver
@@ -266,5 +266,5 @@ 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();
}
@@ -319,5 +319,5 @@ void OTGateway::SLOT_PeerDetected( OTPeer * P, bool IsNew ) {
if( IsNew ) {
// new peer
- owarn << "New peer " << P->name() << oendl;
+ odebug << "New peer " << P->name() << oendl;
addPeer( P );
}
@@ -385,5 +385,5 @@ PANConnectionVector OTGateway::getPANConnections( void ) {
int ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP);
if (ctl < 0) {
- owarn << "Failed to open control socket" << oendl;
+ odebug << "Failed to open control socket" << oendl;
return V;
}
@@ -392,5 +392,5 @@ PANConnectionVector OTGateway::getPANConnections( void ) {
req.ci = ci;
if (ioctl(ctl, BNEPGETCONNLIST, &req)) {
- owarn << "Failed to get connection list" << oendl;
+ odebug << "Failed to get connection list" << oendl;
::close( ctl );
return V;
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
@@ -35,5 +35,5 @@ OTHCISocket::~OTHCISocket() {
void OTHCISocket::close() {
- owarn << "OTHCISocket::close()" << oendl;
+ odebug << "OTHCISocket::close()" << oendl;
if( HCIReadNotifier ) {
delete HCIReadNotifier;
@@ -47,5 +47,5 @@ void OTHCISocket::close() {
bool OTHCISocket::open() {
- owarn << "OTHCISocket::open()" << oendl;
+ odebug << "OTHCISocket::open()" << oendl;
int s;
@@ -152,5 +152,5 @@ void OTHCISocket::slotSocketActivated() {
}
} else {
- owarn << "Error reading hci packet: packetSize("
+ odebug << "Error reading hci packet: packetSize("
<< psize
<< ")-3 != dataSize("
@@ -184,5 +184,5 @@ void OTHCISocket::updateStatus(const QByteArray& data) {
void OTHCISocket::slotConnectionClosed() {
- owarn << "HCI connection closed." << oendl;
+ odebug << "HCI connection closed." << oendl;
emit connectionClosed();
}
@@ -231,5 +231,5 @@ bool OTHCISocket::readStatus( unsigned char ogf,
while (timer.isActive() && HCISocket.isValid()) {
- owarn << "OTHCISocket::readStatus()" << oendl;
+ odebug << "OTHCISocket::readStatus()" << oendl;
bool timeout = false;
@@ -247,5 +247,5 @@ bool OTHCISocket::readStatus( unsigned char ogf,
ocf == LastStatusOcf) {
*status = LastStatus;
- owarn << "OTHCISocket::readStatus(ogf="
+ odebug << "OTHCISocket::readStatus(ogf="
<< ogf
<< ",ocf="
@@ -259,5 +259,5 @@ bool OTHCISocket::readStatus( unsigned char ogf,
}
- owarn << "OTHCISocket::readStatus(ogf="
+ odebug << "OTHCISocket::readStatus(ogf="
<< ogf
<< ",ocf="
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
@@ -60,5 +60,5 @@ OTInquiry::~OTInquiry() {
void OTInquiry::stopInquiring( void ) {
if( Socket ) {
- owarn << "Stop inquiry" << oendl;
+ odebug << "Stop inquiry" << oendl;
Driver->closeSocket();
Socket = 0;
@@ -76,5 +76,5 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) {
cmdBuf[4] = (unsigned char)numResponses;
- owarn << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl;
+ odebug << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl;
Socket->sendCommand(0x01, 0x0001, cmdBuf);
@@ -90,10 +90,10 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) {
else {
QString S =QString().sprintf( "%x", status );
- owarn << "OTInquiry::inquiry() failed: 0x" << S << oendl;
+ odebug << "OTInquiry::inquiry() failed: 0x" << S << oendl;
emit finished();
return false;
}
} else {
- owarn << "OTInquiry::inquiry(): Timeout." << oendl;
+ odebug << "OTInquiry::inquiry(): Timeout." << oendl;
return false;
}
@@ -127,5 +127,5 @@ void OTInquiry::slotInquiryTimeout() {
void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
- owarn << "OTInquiry: hci packet received: eventCode="
+ odebug << "OTInquiry: hci packet received: eventCode="
<< (unsigned int)eventCode
<< " packetLength="
@@ -137,9 +137,9 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
case EVT_INQUIRY_COMPLETE:
{ unsigned char status = data[0];
- owarn << "EVT_INQUIRY_COMPLETE status=" << status << oendl;
+ odebug << "EVT_INQUIRY_COMPLETE status=" << status << oendl;
InquiryTimeoutTimer->stop();
if (status == 0) {
if( SuccessfullyStarted == true) {
- owarn << "OTInquiry ended successfully" << oendl;
+ odebug << "OTInquiry ended successfully" << oendl;
SuccessfullyEnded = true;
}
@@ -164,5 +164,5 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
Addr.setBDAddr( results[n].bdaddr );
- owarn << "INQUIRY_RESULT: "
+ odebug << "INQUIRY_RESULT: "
<< Addr.toString()
<< oendl;
@@ -204,5 +204,5 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) {
int numHciCmdPkts = data[1];
int cmdOpcode = *((uint16_t*)(data+2));
- owarn << "EVT_CMD_STATUS status="
+ odebug << "EVT_CMD_STATUS status="
<< status
<< " numPkts="
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
@@ -52,5 +52,5 @@ void OTPeer::updateServices( void ) {
serviceList.clear();
- owarn << "Get services from " << Addr.toString() << oendl;
+ odebug << "Get services from " << Addr.toString() << oendl;
session = sdp_connect( &(OTDeviceAddress::any.getBDAddr()),
@@ -59,5 +59,5 @@ void OTPeer::updateServices( void ) {
if (!session) {
- owarn << "sdp_connect("
+ odebug << "sdp_connect("
<< Addr.toString()
<< ") failed"
@@ -81,5 +81,5 @@ void OTPeer::updateServices( void ) {
attrId,
&seq ) ) {
- owarn << "Service Search failed" << oendl;
+ odebug << "Service Search failed" << oendl;
sdp_close(session);
return;
@@ -178,5 +178,5 @@ void OTPeer::findOutState( int timeoutInSec, bool Force ) {
ProbePhase = 0;
ProbeTimeout = timeoutInSec*1000;
- owarn << "Ping " << address().toString() << oendl;
+ odebug << "Ping " << address().toString() << oendl;
startTimer( POLLDELAY );
} else {
@@ -236,5 +236,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
pf[0].events = POLLOUT;
if( (n = ::poll(pf, 1, 0)) < 0 ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
<< errno
@@ -267,5 +267,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
// connect because the device does not allow us
// but it is UP
- owarn << address().toString()
+ odebug << address().toString()
<< " good send error "
<< errno
@@ -277,5 +277,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
break;
} else if( errno != EBUSY ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
<< errno
@@ -300,5 +300,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
pf[0].events = POLLIN;
if( (n = ::poll(pf, 1, 0)) < 0 ) {
- owarn << address().toString()
+ odebug << address().toString()
<< " : errno "
<< errno
@@ -316,5 +316,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
if( (n = ::recv( ProbeFD, buf, sizeof(buf), 0)) < 0) {
- owarn << address().toString()
+ odebug << address().toString()
<< "errno "
<< errno
@@ -331,5 +331,5 @@ void OTPeer::timerEvent( QTimerEvent * ev ) {
break;
- owarn << "reply from "
+ odebug << "reply from "
<< address().toString()
<< oendl;
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
@@ -538,5 +538,5 @@ void OTScan::SLOT_Selected( QListViewItem * it ) {
SelectedChannel = 0;
}
- owarn << "Selected " << SelectedPeer->address().toString() <<
+ odebug << "Selected " << SelectedPeer->address().toString() <<
" Channel " << SelectedChannel << oendl;
emit selected();
@@ -566,5 +566,5 @@ void OTScan::SLOT_CleanupOld( ) {
) {
// part of linkkey
- owarn << "LINKKEY " << TheP->address().toString() << oendl;
+ odebug << "LINKKEY " << TheP->address().toString() << oendl;
break;
}
@@ -572,5 +572,5 @@ 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
QListViewItem * Nit;
@@ -582,5 +582,5 @@ void OTScan::SLOT_CleanupOld( ) {
}
} else {
- owarn << "NODOWN " << TheP->address().toString() << oendl;
+ odebug << "NODOWN " << TheP->address().toString() << oendl;
}
@@ -607,5 +607,5 @@ void OTScan::SLOT_NewPeer( OTPeer * P, bool IsNew ){
if( ! it ) {
- owarn << "Should not occur" << oendl;
+ odebug << "Should not occur" << oendl;
return;
}
@@ -930,5 +930,5 @@ void OTManage::SLOT_UpDriver( bool Up ) {
if( it->isSelected() ) {
OTDriver * D = ((DriverLVI *)it)->driver();
- owarn << "UP driver " << D->devname() << oendl;
+ odebug << "UP driver " << D->devname() << oendl;
// this
D->setUp( Up );
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
@@ -6,5 +6,5 @@ QTPB=/opt/QtPalmtop/bin
# qcop QPE/Taskbar "linkChanged(opietooth)"
-qcop QPE/Taskbar "reloadApps()"
+${QTPB}/qcop QPE/Taskbar "reloadApps()"
exit 0
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
@@ -36,2 +36,9 @@ 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
@@ -11,5 +11,5 @@ 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 ) {
if( ! Data->Disabled ) {
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
@@ -39,4 +39,5 @@ State_t USBRun::detectState( void ) {
Log(("Assigned %p\n", NC->assignedInterface() ));
+
if( ( Run = NC->assignedInterface() ) ) {
// we already have an interface assigned -> still present ?
@@ -51,19 +52,5 @@ 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
// usb cables are currently always available when requested
@@ -71,5 +58,4 @@ State_t USBRun::detectState( void ) {
return Available;
}
- }
return Unavailable;
@@ -78,6 +64,14 @@ State_t USBRun::detectState( void ) {
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();
}
@@ -88,5 +82,4 @@ InterfaceInfo * USBRun::getInterface( void ) {
System & S = NSResources->system();
InterfaceInfo * best = 0, * Run;
- QRegExp R( "usb[0-9abcdef]" );
for( QDictIterator<InterfaceInfo> It(S.interfaces());
@@ -94,4 +87,11 @@ InterfaceInfo * USBRun::getInterface( void ) {
++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
@@ -101,8 +101,9 @@ InterfaceInfo * USBRun::getInterface( void ) {
// assigned to us
return Run;
- } else if( Run->assignedConnection() == 0 ) {
+ } else if( ! Run->IsUp &&
+ Run->assignedConnection() == 0 ) {
// free
best = Run;
- }
+ } // UP or not assigned to us
}
}