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 ) { | |||
26 | 26 | ||
27 | owarn << "Bluetooth " | 27 | odebug << "Bluetooth " |
28 | << OT->isEnabled() | 28 | << OT->isEnabled() |
@@ -121,3 +121,3 @@ RFCOMMChannel * BluetoothRFCOMMRun::getChannel( void ) { | |||
121 | if( LB->isSelected(i) ) { | 121 | if( LB->isSelected(i) ) { |
122 | owarn << "Selected " << Data->Devices[i]->Name << oendl; | 122 | odebug << "Selected " << Data->Devices[i]->Name << oendl; |
123 | Ch = Data->Devices[i]; | 123 | Ch = Data->Devices[i]; |
@@ -149,3 +149,3 @@ int BluetoothRFCOMMRun::deviceNrOfConnection( void ) { | |||
149 | for( unsigned int i = 0; i < Data->Devices.count(); i ++ ) { | 149 | for( unsigned int i = 0; i < Data->Devices.count(); i ++ ) { |
150 | owarn << "Check for rfcomm on " | 150 | odebug << "Check for rfcomm on " |
151 | << Data->Devices[i]->BDAddress | 151 | << Data->Devices[i]->BDAddress |
@@ -157,3 +157,3 @@ int BluetoothRFCOMMRun::deviceNrOfConnection( void ) { | |||
157 | Data->Devices[i]->Channel ) ) >= 0 ) { | 157 | Data->Devices[i]->Channel ) ) >= 0 ) { |
158 | owarn << "Up " | 158 | odebug << "Up " |
159 | << oendl; | 159 | << 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 @@ | |||
3 | default "n" if NS2 | 3 | default "n" if NS2 |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && NS2CORE && NS2OPIETOOTH | 4 | 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 @@ | |||
5 | config NS2 | 5 | config NS2 |
6 | boolean | 6 | boolean "opie-networksettings2 application" |
7 | default "y" | 7 | 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 ) { | |||
157 | if( ! it ) { | 157 | if( ! it ) { |
158 | owarn << "Radio not selected" << oendl; | ||
159 | TmpIsValid = 0; | 158 | 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 ) { | |||
25 | 25 | ||
26 | owarn << "Check for ppp " << NC->name() << oendl; | 26 | odebug << "Check for ppp " << NC->name() << oendl; |
27 | if( D.exists( QString("ppp-")+removeSpaces(NC->name())+".pid") ) { | 27 | if( D.exists( QString("ppp-")+removeSpaces(NC->name())+".pid") ) { |
@@ -30,3 +30,3 @@ State_t GPRSRun::detectState( void ) { | |||
30 | 30 | ||
31 | owarn << "PPP PID " << F.name() << oendl; | 31 | odebug << "PPP PID " << F.name() << oendl; |
32 | if( F.open( IO_ReadOnly ) ) { | 32 | if( F.open( IO_ReadOnly ) ) { |
@@ -45,3 +45,3 @@ State_t GPRSRun::detectState( void ) { | |||
45 | 45 | ||
46 | owarn << "ppp running : IFace " << X << " = " << (long)I << oendl; | 46 | odebug << "ppp running : IFace " << X << " = " << (long)I << oendl; |
47 | 47 | ||
@@ -90,3 +90,3 @@ QString GPRSRun::setMyState( NodeCollection * NC, Action_t A , bool ) { | |||
90 | NC->assignInterface( 0 ); | 90 | NC->assignInterface( 0 ); |
91 | owarn << "ppp stopped " << oendl; | 91 | odebug << "ppp stopped " << oendl; |
92 | PPPPid = 0; | 92 | 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 ) { | |||
24 | 24 | ||
25 | if( ! II ) { | ||
26 | Log(( "no interface assigned." )); | ||
27 | return QString(); | ||
28 | } | ||
29 | |||
30 | QStringList SL; | ||
31 | |||
25 | if( A == Up ) { | 32 | if( A == Up ) { |
26 | // we can bring UP if lower level is available | 33 | // we can bring UP if lower level is available |
27 | QStringList SL; | 34 | SL << "ifup"; |
28 | SL << "ifup" | 35 | } else if( A == Down ) { |
29 | << QString().sprintf( "%s=%s-c%d-allowed", | 36 | SL << "ifdown"; |
30 | II->Name.latin1(), II->Name.latin1(), | 37 | } else { |
31 | nodeCollection()->number() ); | ||
32 | if( ! NSResources->system().runAsRoot( SL ) ) { | ||
33 | return QString("Cannot call %1").arg(SL.join(" ")); | ||
34 | } | ||
35 | return QString(); | 38 | return QString(); |
@@ -37,7 +40,6 @@ QString NetworkRun::setMyState( NodeCollection * NC, Action_t A, bool ) { | |||
37 | 40 | ||
38 | if( A == Down ) { | 41 | SL << QString().sprintf( "%s=%s-c%d-allowed", |
39 | QStringList SL; | 42 | II->Name.latin1(), II->Name.latin1(), |
40 | if( II ) { | 43 | nodeCollection()->number() ); |
41 | SL << "ifdown" | 44 | |
42 | << II->Name.latin1(); | ||
43 | if( ! NSResources->system().runAsRoot( SL ) ) { | 45 | if( ! NSResources->system().runAsRoot( SL ) ) { |
@@ -45,6 +47,3 @@ QString NetworkRun::setMyState( NodeCollection * NC, Action_t A, bool ) { | |||
45 | } | 47 | } |
46 | } else { | 48 | |
47 | Log(( "no interface assigned." )); | ||
48 | } | ||
49 | } | ||
50 | return QString(); | 49 | 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() { | |||
111 | 111 | ||
112 | owarn << "Dispose NS" << oendl; | ||
113 | if( NSD.isModified() ) { | 112 | if( NSD.isModified() ) { |
114 | owarn << "Modified" << oendl; | ||
115 | S = NSD.saveSettings(); | 113 | S = NSD.saveSettings(); |
@@ -288,3 +286,2 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) { | |||
288 | 286 | ||
289 | owarn << "State " << NC->state() << oendl; | ||
290 | switch( NC->state() ) { | 287 | switch( NC->state() ) { |
@@ -293,3 +290,2 @@ void NetworkSettings::SLOT_ShowNode( QListBoxItem * LBI ) { | |||
293 | FrmActive = 0; | 290 | FrmActive = 0; |
294 | owarn << "LEds " << leds << oendl; | ||
295 | break; | 291 | break; |
@@ -361,3 +357,3 @@ void NetworkSettings::SLOT_Disable( bool T ) { | |||
361 | 357 | ||
362 | owarn << "Prepare to disable" << oendl; | 358 | Log(( "Prepare to %sable\n", (T) ? "en" : "dis" )); |
363 | Msg = NC->setState( (T) ? Disable : Enable ); | 359 | 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 @@ | |||
1 | config NS2CORE | 1 | config NS2CORE |
2 | boolean "opie-networksettings2 (TCP/IP network settings)" | 2 | boolean "opie-networksettings2 library" |
3 | default "y" | 3 | 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 ) { | |||
74 | if( getenv( "NS2TESTMODE" ) ) { | 74 | if( getenv( "NS2TESTMODE" ) ) { |
75 | owarn << "TESTMODE !!! execute " | 75 | odebug << "TESTMODE !!! execute " |
76 | << S.join( " ") | 76 | << S.join( " ") |
@@ -108,3 +108,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) { | |||
108 | OProcess::AllOutput ) ) { | 108 | OProcess::AllOutput ) ) { |
109 | owarn << "Error starting " << S << oendl; | 109 | odebug << "Error starting " << S << oendl; |
110 | if( ! Prc ) | 110 | if( ! Prc ) |
@@ -114,3 +114,3 @@ int System::runAsRoot( QStringList & S, MyProcess * Prc ) { | |||
114 | } | 114 | } |
115 | owarn << "Started " << S << oendl; | 115 | odebug << "Started " << S << oendl; |
116 | } | 116 | } |
@@ -272,3 +272,3 @@ void System::probeInterfaces( void ) { | |||
272 | if(sockfd == -1) { | 272 | if(sockfd == -1) { |
273 | owarn << "Cannot open INET socket " | 273 | odebug << "Cannot open INET socket " |
274 | << errno | 274 | << errno |
@@ -284,3 +284,3 @@ void System::probeInterfaces( void ) { | |||
284 | if( ! ProcDevNet->open(IO_ReadOnly) ) { | 284 | if( ! ProcDevNet->open(IO_ReadOnly) ) { |
285 | owarn << "Cannot open " | 285 | odebug << "Cannot open " |
286 | << PROCNETDEV | 286 | << PROCNETDEV |
@@ -511,3 +511,3 @@ QString removeSpaces( const QString & X ) { | |||
511 | Y.replace( QRegExp(" "), "_" ); | 511 | Y.replace( QRegExp(" "), "_" ); |
512 | owarn << X << " **" << Y << "**" << oendl; | 512 | odebug << X << " **" << Y << "**" << oendl; |
513 | return Y; | 513 | return Y; |
@@ -550,3 +550,3 @@ void MyProcess::SLOT_Stdout( Opie::Core::OProcess * , char * Buf, int len ) { | |||
550 | 550 | ||
551 | owarn << "Received " << len << " bytes on stdout" << oendl; | 551 | odebug << "Received " << len << " bytes on stdout" << oendl; |
552 | // see if we have some lines (allow empty lines) | 552 | // see if we have some lines (allow empty lines) |
@@ -571,3 +571,3 @@ void MyProcess::SLOT_Stderr( Opie::Core::OProcess * , char * Buf, int len ) { | |||
571 | 571 | ||
572 | owarn << "Received " << len << " bytes on stderr" << oendl; | 572 | odebug << "Received " << len << " bytes on stderr" << oendl; |
573 | // see if we have some lines (allow empty lines) | 573 | // 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 ) { | |||
101 | if( ! F ) { | 101 | if( ! F ) { |
102 | owarn << "!!!!!!!!!!!!!!!!!! " << oendl; | 102 | odebug << "!!!!!!!!!!!!!!!!!! " << oendl; |
103 | owarn << "!!!! TESTMODE !!!!" << oendl; | 103 | odebug << "!!!! TESTMODE !!!!" << oendl; |
104 | owarn << "!!!!!!!!!!!!!!!!!! " << oendl; | 104 | odebug << "!!!!!!!!!!!!!!!!!! " << oendl; |
105 | owarn << "!!!!" << oendl; | 105 | odebug << "!!!!" << oendl; |
106 | owarn << "!!!! GENERATE " << Path << oendl; | 106 | odebug << "!!!! GENERATE " << Path << oendl; |
107 | if( InAppend ) { | 107 | if( InAppend ) { |
108 | owarn << "!!!! In APPEND mode" << oendl; | 108 | odebug << "!!!! In APPEND mode" << oendl; |
109 | } | 109 | } |
110 | owarn << "!!!!" << oendl; | 110 | odebug << "!!!!" << oendl; |
111 | owarn << "!!!!!!!!!!!!!!!!!!" << oendl; | 111 | odebug << "!!!!!!!!!!!!!!!!!!" << oendl; |
112 | 112 | ||
@@ -138,3 +138,3 @@ bool SystemFile::close( void ) { | |||
138 | if( ! InAppend ) { | 138 | if( ! InAppend ) { |
139 | owarn << "Rename " << OldP << " to " << Path << oendl; | 139 | odebug << "Rename " << OldP << " to " << Path << oendl; |
140 | return ( rename( OldP.latin1(), Path.latin1() ) >= 0 ); | 140 | 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 | |||
6 | 6 | ||
7 | qcop QPE/TaskBar "reloadApps()" | 7 | ${QTPB}/qcop QPE/TaskBar "reloadApps()" |
8 | 8 | ||
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(){ | |||
105 | if( kill( m_hciattachPid, 9) < 0 ) { | 105 | if( kill( m_hciattachPid, 9) < 0 ) { |
106 | owarn << "could not stop " << errno << oendl; | 106 | odebug << "could not stop " << errno << oendl; |
107 | emit error( tr( "Could not stop process" ) ); | 107 | emit error( tr( "Could not stop process" ) ); |
@@ -170,3 +170,3 @@ void OTDevice::slotStdErr(OProcess* proc, char* chars, int len) { | |||
170 | m_output.append( string.data() ); | 170 | m_output.append( string.data() ); |
171 | owarn << m_output << oendl; | 171 | odebug << m_output << oendl; |
172 | } | 172 | } |
@@ -213,3 +213,3 @@ void OTDevice::detectDeviceType( QString & Device, | |||
213 | // detect device type and determine parms | 213 | // detect device type and determine parms |
214 | owarn << "Detecting device" << oendl; | 214 | odebug << "Detecting device" << oendl; |
215 | switch ( ODevice::inst()->model() ) { | 215 | 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 ), | |||
152 | init(di); | 152 | init(di); |
153 | owarn << "Driver " << devname() << oendl; | 153 | odebug << "Driver " << devname() << oendl; |
154 | 154 | ||
@@ -387,3 +387,3 @@ void OTDriver::bringUp() { | |||
387 | 387 | ||
388 | owarn << "bringUp : " << Dev << oendl; | 388 | odebug << "bringUp : " << Dev << oendl; |
389 | 389 | ||
@@ -410,3 +410,3 @@ void OTDriver::bringDown() { | |||
410 | 410 | ||
411 | owarn << "bringDown : " << Dev << oendl; | 411 | odebug << "bringDown : " << Dev << oendl; |
412 | 412 | ||
@@ -663,3 +663,3 @@ OTHCISocket * OTDriver::openSocket( void ) { | |||
663 | if( ! Socket ) { | 663 | if( ! Socket ) { |
664 | owarn << "Open HCI socket to " << devname() << oendl; | 664 | odebug << "Open HCI socket to " << devname() << oendl; |
665 | Socket = new OTHCISocket( this ); | 665 | Socket = new OTHCISocket( this ); |
@@ -671,3 +671,3 @@ void OTDriver::closeSocket( void ) { | |||
671 | if( Socket ) { | 671 | if( Socket ) { |
672 | owarn << "Close HCI socket to " << devname() << oendl; | 672 | odebug << "Close HCI socket to " << devname() << oendl; |
673 | delete Socket; | 673 | delete Socket; |
@@ -715,3 +715,3 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) { | |||
715 | if (ioctl( fd(), HCIGETCONNINFO, (unsigned long) cr) < 0) { | 715 | if (ioctl( fd(), HCIGETCONNINFO, (unsigned long) cr) < 0) { |
716 | owarn << "Get connection info failed" << oendl; | 716 | odebug << "Get connection info failed" << oendl; |
717 | free(cr); | 717 | free(cr); |
@@ -733,3 +733,3 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) { | |||
733 | if (hci_send_req( fd(), &rq, 100) < 0) { | 733 | if (hci_send_req( fd(), &rq, 100) < 0) { |
734 | owarn << "Get connection info failed" << oendl; | 734 | odebug << "Get connection info failed" << oendl; |
735 | return 0; | 735 | return 0; |
@@ -738,3 +738,3 @@ long OTDriver::getLinkQuality( const OTDeviceAddress & Addr ) { | |||
738 | if( rp.status ) { | 738 | if( rp.status ) { |
739 | owarn << QString().sprintf("HCI get_link_quality cmd failed (0x%2.2X)", rp.status) << oendl; | 739 | odebug << QString().sprintf("HCI get_link_quality cmd failed (0x%2.2X)", rp.status) << oendl; |
740 | return 0; | 740 | 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() { | |||
55 | if( ioctl( OT->getSocket(), HCIGETDEVLIST, (void*)dl) ) { | 55 | if( ioctl( OT->getSocket(), HCIGETDEVLIST, (void*)dl) ) { |
56 | owarn << "WARNING : cannot read device list. " | 56 | odebug << "WARNING : cannot read device list. " |
57 | << errno | 57 | << errno |
@@ -81,3 +81,3 @@ void OTDriverList::update() { | |||
81 | 81 | ||
82 | owarn << "Found " << count() << " devices" << oendl; | 82 | odebug << "Found " << count() << " devices" << oendl; |
83 | 83 | ||
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 ) { | |||
156 | 156 | ||
157 | owarn << S << oendl; | 157 | odebug << S << oendl; |
158 | 158 | ||
@@ -212,3 +212,3 @@ void OTGateway::timerEvent( QTimerEvent * ) { | |||
212 | void OTGateway::SLOT_Enabled( int id, bool Up ) { | 212 | void OTGateway::SLOT_Enabled( int id, bool Up ) { |
213 | owarn << "device " << id << " state " << Up << oendl; | 213 | odebug << "device " << id << " state " << Up << oendl; |
214 | if( Up ) { | 214 | if( Up ) { |
@@ -229,3 +229,3 @@ void OTGateway::updateDrivers( void ) { | |||
229 | 229 | ||
230 | owarn << "updated drivers. now " << AllDrivers.count() << oendl; | 230 | odebug << "updated drivers. now " << AllDrivers.count() << oendl; |
231 | 231 | ||
@@ -267,3 +267,3 @@ void OTGateway::updateDrivers( void ) { | |||
267 | void OTGateway::SLOT_DriverDisappeared( OTDriver * D ) { | 267 | void OTGateway::SLOT_DriverDisappeared( OTDriver * D ) { |
268 | owarn << "Driver " << D->devname() << " when offline" << oendl; | 268 | odebug << "Driver " << D->devname() << " when offline" << oendl; |
269 | updateDrivers(); | 269 | updateDrivers(); |
@@ -320,3 +320,3 @@ void OTGateway::SLOT_PeerDetected( OTPeer * P, bool IsNew ) { | |||
320 | // new peer | 320 | // new peer |
321 | owarn << "New peer " << P->name() << oendl; | 321 | odebug << "New peer " << P->name() << oendl; |
322 | addPeer( P ); | 322 | addPeer( P ); |
@@ -386,3 +386,3 @@ PANConnectionVector OTGateway::getPANConnections( void ) { | |||
386 | if (ctl < 0) { | 386 | if (ctl < 0) { |
387 | owarn << "Failed to open control socket" << oendl; | 387 | odebug << "Failed to open control socket" << oendl; |
388 | return V; | 388 | return V; |
@@ -393,3 +393,3 @@ PANConnectionVector OTGateway::getPANConnections( void ) { | |||
393 | if (ioctl(ctl, BNEPGETCONNLIST, &req)) { | 393 | if (ioctl(ctl, BNEPGETCONNLIST, &req)) { |
394 | owarn << "Failed to get connection list" << oendl; | 394 | odebug << "Failed to get connection list" << oendl; |
395 | ::close( ctl ); | 395 | ::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() { | |||
36 | void OTHCISocket::close() { | 36 | void OTHCISocket::close() { |
37 | owarn << "OTHCISocket::close()" << oendl; | 37 | odebug << "OTHCISocket::close()" << oendl; |
38 | if( HCIReadNotifier ) { | 38 | if( HCIReadNotifier ) { |
@@ -48,3 +48,3 @@ bool OTHCISocket::open() { | |||
48 | 48 | ||
49 | owarn << "OTHCISocket::open()" << oendl; | 49 | odebug << "OTHCISocket::open()" << oendl; |
50 | int s; | 50 | int s; |
@@ -153,3 +153,3 @@ void OTHCISocket::slotSocketActivated() { | |||
153 | } else { | 153 | } else { |
154 | owarn << "Error reading hci packet: packetSize(" | 154 | odebug << "Error reading hci packet: packetSize(" |
155 | << psize | 155 | << psize |
@@ -185,3 +185,3 @@ void OTHCISocket::updateStatus(const QByteArray& data) { | |||
185 | void OTHCISocket::slotConnectionClosed() { | 185 | void OTHCISocket::slotConnectionClosed() { |
186 | owarn << "HCI connection closed." << oendl; | 186 | odebug << "HCI connection closed." << oendl; |
187 | emit connectionClosed(); | 187 | emit connectionClosed(); |
@@ -232,3 +232,3 @@ bool OTHCISocket::readStatus( unsigned char ogf, | |||
232 | 232 | ||
233 | owarn << "OTHCISocket::readStatus()" << oendl; | 233 | odebug << "OTHCISocket::readStatus()" << oendl; |
234 | bool timeout = false; | 234 | bool timeout = false; |
@@ -248,3 +248,3 @@ bool OTHCISocket::readStatus( unsigned char ogf, | |||
248 | *status = LastStatus; | 248 | *status = LastStatus; |
249 | owarn << "OTHCISocket::readStatus(ogf=" | 249 | odebug << "OTHCISocket::readStatus(ogf=" |
250 | << ogf | 250 | << ogf |
@@ -260,3 +260,3 @@ bool OTHCISocket::readStatus( unsigned char ogf, | |||
260 | 260 | ||
261 | owarn << "OTHCISocket::readStatus(ogf=" | 261 | odebug << "OTHCISocket::readStatus(ogf=" |
262 | << ogf | 262 | << 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 ) { | |||
61 | if( Socket ) { | 61 | if( Socket ) { |
62 | owarn << "Stop inquiry" << oendl; | 62 | odebug << "Stop inquiry" << oendl; |
63 | Driver->closeSocket(); | 63 | Driver->closeSocket(); |
@@ -77,3 +77,3 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) { | |||
77 | 77 | ||
78 | owarn << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl; | 78 | odebug << "Send HCI inquiry command. wait for " << cmdBuf[3] << oendl; |
79 | 79 | ||
@@ -91,3 +91,3 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) { | |||
91 | QString S =QString().sprintf( "%x", status ); | 91 | QString S =QString().sprintf( "%x", status ); |
92 | owarn << "OTInquiry::inquiry() failed: 0x" << S << oendl; | 92 | odebug << "OTInquiry::inquiry() failed: 0x" << S << oendl; |
93 | emit finished(); | 93 | emit finished(); |
@@ -96,3 +96,3 @@ bool OTInquiry::inquire( double timeout, int numResponses, int lap) { | |||
96 | } else { | 96 | } else { |
97 | owarn << "OTInquiry::inquiry(): Timeout." << oendl; | 97 | odebug << "OTInquiry::inquiry(): Timeout." << oendl; |
98 | return false; | 98 | return false; |
@@ -128,3 +128,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
128 | 128 | ||
129 | owarn << "OTInquiry: hci packet received: eventCode=" | 129 | odebug << "OTInquiry: hci packet received: eventCode=" |
130 | << (unsigned int)eventCode | 130 | << (unsigned int)eventCode |
@@ -138,3 +138,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
138 | { unsigned char status = data[0]; | 138 | { unsigned char status = data[0]; |
139 | owarn << "EVT_INQUIRY_COMPLETE status=" << status << oendl; | 139 | odebug << "EVT_INQUIRY_COMPLETE status=" << status << oendl; |
140 | InquiryTimeoutTimer->stop(); | 140 | InquiryTimeoutTimer->stop(); |
@@ -142,3 +142,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
142 | if( SuccessfullyStarted == true) { | 142 | if( SuccessfullyStarted == true) { |
143 | owarn << "OTInquiry ended successfully" << oendl; | 143 | odebug << "OTInquiry ended successfully" << oendl; |
144 | SuccessfullyEnded = true; | 144 | SuccessfullyEnded = true; |
@@ -165,3 +165,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
165 | 165 | ||
166 | owarn << "INQUIRY_RESULT: " | 166 | odebug << "INQUIRY_RESULT: " |
167 | << Addr.toString() | 167 | << Addr.toString() |
@@ -205,3 +205,3 @@ void OTInquiry::slotHCIEvent(unsigned char eventCode, QByteArray buf) { | |||
205 | int cmdOpcode = *((uint16_t*)(data+2)); | 205 | int cmdOpcode = *((uint16_t*)(data+2)); |
206 | owarn << "EVT_CMD_STATUS status=" | 206 | odebug << "EVT_CMD_STATUS status=" |
207 | << status | 207 | << 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 ) { | |||
53 | 53 | ||
54 | owarn << "Get services from " << Addr.toString() << oendl; | 54 | odebug << "Get services from " << Addr.toString() << oendl; |
55 | 55 | ||
@@ -60,3 +60,3 @@ void OTPeer::updateServices( void ) { | |||
60 | if (!session) { | 60 | if (!session) { |
61 | owarn << "sdp_connect(" | 61 | odebug << "sdp_connect(" |
62 | << Addr.toString() | 62 | << Addr.toString() |
@@ -82,3 +82,3 @@ void OTPeer::updateServices( void ) { | |||
82 | &seq ) ) { | 82 | &seq ) ) { |
83 | owarn << "Service Search failed" << oendl; | 83 | odebug << "Service Search failed" << oendl; |
84 | sdp_close(session); | 84 | sdp_close(session); |
@@ -179,3 +179,3 @@ void OTPeer::findOutState( int timeoutInSec, bool Force ) { | |||
179 | ProbeTimeout = timeoutInSec*1000; | 179 | ProbeTimeout = timeoutInSec*1000; |
180 | owarn << "Ping " << address().toString() << oendl; | 180 | odebug << "Ping " << address().toString() << oendl; |
181 | startTimer( POLLDELAY ); | 181 | startTimer( POLLDELAY ); |
@@ -237,3 +237,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { | |||
237 | if( (n = ::poll(pf, 1, 0)) < 0 ) { | 237 | if( (n = ::poll(pf, 1, 0)) < 0 ) { |
238 | owarn << address().toString() | 238 | odebug << address().toString() |
239 | << " : errno " | 239 | << " : errno " |
@@ -268,3 +268,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { | |||
268 | // but it is UP | 268 | // but it is UP |
269 | owarn << address().toString() | 269 | odebug << address().toString() |
270 | << " good send error " | 270 | << " good send error " |
@@ -278,3 +278,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { | |||
278 | } else if( errno != EBUSY ) { | 278 | } else if( errno != EBUSY ) { |
279 | owarn << address().toString() | 279 | odebug << address().toString() |
280 | << " : errno " | 280 | << " : errno " |
@@ -301,3 +301,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { | |||
301 | if( (n = ::poll(pf, 1, 0)) < 0 ) { | 301 | if( (n = ::poll(pf, 1, 0)) < 0 ) { |
302 | owarn << address().toString() | 302 | odebug << address().toString() |
303 | << " : errno " | 303 | << " : errno " |
@@ -317,3 +317,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { | |||
317 | if( (n = ::recv( ProbeFD, buf, sizeof(buf), 0)) < 0) { | 317 | if( (n = ::recv( ProbeFD, buf, sizeof(buf), 0)) < 0) { |
318 | owarn << address().toString() | 318 | odebug << address().toString() |
319 | << "errno " | 319 | << "errno " |
@@ -332,3 +332,3 @@ void OTPeer::timerEvent( QTimerEvent * ev ) { | |||
332 | 332 | ||
333 | owarn << "reply from " | 333 | odebug << "reply from " |
334 | << address().toString() | 334 | << 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 ) { | |||
539 | } | 539 | } |
540 | owarn << "Selected " << SelectedPeer->address().toString() << | 540 | odebug << "Selected " << SelectedPeer->address().toString() << |
541 | " Channel " << SelectedChannel << oendl; | 541 | " Channel " << SelectedChannel << oendl; |
@@ -567,3 +567,3 @@ void OTScan::SLOT_CleanupOld( ) { | |||
567 | // part of linkkey | 567 | // part of linkkey |
568 | owarn << "LINKKEY " << TheP->address().toString() << oendl; | 568 | odebug << "LINKKEY " << TheP->address().toString() << oendl; |
569 | break; | 569 | break; |
@@ -573,3 +573,3 @@ void OTScan::SLOT_CleanupOld( ) { | |||
573 | if( k == Keys.count() ) { | 573 | if( k == Keys.count() ) { |
574 | owarn << "RM LINKKEY " << TheP->address().toString() << oendl; | 574 | odebug << "RM LINKKEY " << TheP->address().toString() << oendl; |
575 | // not found -> remember to remove this peer | 575 | // not found -> remember to remove this peer |
@@ -583,3 +583,3 @@ void OTScan::SLOT_CleanupOld( ) { | |||
583 | } else { | 583 | } else { |
584 | owarn << "NODOWN " << TheP->address().toString() << oendl; | 584 | odebug << "NODOWN " << TheP->address().toString() << oendl; |
585 | } | 585 | } |
@@ -608,3 +608,3 @@ void OTScan::SLOT_NewPeer( OTPeer * P, bool IsNew ){ | |||
608 | if( ! it ) { | 608 | if( ! it ) { |
609 | owarn << "Should not occur" << oendl; | 609 | odebug << "Should not occur" << oendl; |
610 | return; | 610 | return; |
@@ -931,3 +931,3 @@ void OTManage::SLOT_UpDriver( bool Up ) { | |||
931 | OTDriver * D = ((DriverLVI *)it)->driver(); | 931 | OTDriver * D = ((DriverLVI *)it)->driver(); |
932 | owarn << "UP driver " << D->devname() << oendl; | 932 | odebug << "UP driver " << D->devname() << oendl; |
933 | // this | 933 | // 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 @@ | |||
1 | config NS2OPIETOOTH | 1 | config NS2OPIETOOTH |
2 | boolean "opie-networksettings2 bluetooth library" | 2 | boolean "Opietooth2 bluetooth library" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBBLUEZ_DEP && NS2CORE |
5 | 5 | ||
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 | |||
7 | # qcop QPE/Taskbar "linkChanged(opietooth)" | 7 | # qcop QPE/Taskbar "linkChanged(opietooth)" |
8 | qcop QPE/Taskbar "reloadApps()" | 8 | ${QTPB}/qcop QPE/Taskbar "reloadApps()" |
9 | 9 | ||
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 | |||
37 | include ( $(OPIEDIR)/include.pro ) | 37 | include ( $(OPIEDIR)/include.pro ) |
38 | |||
39 | !isEmpty( LIBBLUEZ_INC_DIR ) { | ||
40 | INCLUDEPATH += $$LIBBLUEZ_INC_DIR | ||
41 | } | ||
42 | !isEmpty( LIBBLUEZ_LIB_DIR ) { | ||
43 | LIBS += -L$$LIBBLUEZ_LIB_DIR | ||
44 | } | ||
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 ) { | |||
12 | QString ProfileRun::setMyState( NodeCollection * NC, Action_t A, bool ) { | 12 | QString ProfileRun::setMyState( NodeCollection * NC, Action_t A, bool ) { |
13 | owarn << "Profile " << Data->Disabled << oendl; | 13 | odebug << "Profile " << Data->Disabled << oendl; |
14 | if( A == Disable ) { | 14 | 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 ) { | |||
40 | Log(("Assigned %p\n", NC->assignedInterface() )); | 40 | Log(("Assigned %p\n", NC->assignedInterface() )); |
41 | |||
41 | if( ( Run = NC->assignedInterface() ) ) { | 42 | if( ( Run = NC->assignedInterface() ) ) { |
@@ -52,17 +53,3 @@ State_t USBRun::detectState( void ) { | |||
52 | // find possible interface | 53 | // find possible interface |
53 | for( QDictIterator<InterfaceInfo> It(Sys.interfaces()); | 54 | if( getInterface() ) { |
54 | It.current(); | ||
55 | ++It ) { | ||
56 | Run = It.current(); | ||
57 | |||
58 | Log(("%s %d %d=%d %d\n", | ||
59 | Run->Name.latin1(), | ||
60 | handlesInterface( Run->Name ), | ||
61 | Run->CardType, ARPHRD_ETHER, | ||
62 | ! Run->IsUp )); | ||
63 | |||
64 | if( handlesInterface( Run->Name ) && | ||
65 | Run->CardType == ARPHRD_ETHER && | ||
66 | ! Run->IsUp | ||
67 | ) { | ||
68 | // proper type, and Not UP -> free | 55 | // proper type, and Not UP -> free |
@@ -72,3 +59,2 @@ State_t USBRun::detectState( void ) { | |||
72 | } | 59 | } |
73 | } | ||
74 | 60 | ||
@@ -79,4 +65,12 @@ QString USBRun::setMyState( NodeCollection * NC, Action_t A, bool ) { | |||
79 | 65 | ||
80 | // nothing needs to be done to 'activate' or 'deactivate' | 66 | InterfaceInfo * I = getInterface(); |
81 | // a cable | 67 | |
68 | if( ! I ) { | ||
69 | return QString("No usb device available"); | ||
70 | } | ||
71 | |||
72 | Log(( "Grabbed USB interface %s\n", I->Name.latin1() )); | ||
73 | // grab this interface | ||
74 | NC->assignInterface( I ); | ||
75 | |||
82 | return QString(); | 76 | return QString(); |
@@ -89,3 +83,2 @@ InterfaceInfo * USBRun::getInterface( void ) { | |||
89 | InterfaceInfo * best = 0, * Run; | 83 | InterfaceInfo * best = 0, * Run; |
90 | QRegExp R( "usb[0-9abcdef]" ); | ||
91 | 84 | ||
@@ -95,2 +88,9 @@ InterfaceInfo * USBRun::getInterface( void ) { | |||
95 | Run = It.current(); | 88 | Run = It.current(); |
89 | |||
90 | Log(("%s %d %d=%d %d\n", | ||
91 | Run->Name.latin1(), | ||
92 | handlesInterface( Run->Name ), | ||
93 | Run->CardType, ARPHRD_ETHER, | ||
94 | ! Run->IsUp )); | ||
95 | |||
96 | if( handlesInterface( Run->Name ) && | 96 | if( handlesInterface( Run->Name ) && |
@@ -102,6 +102,7 @@ InterfaceInfo * USBRun::getInterface( void ) { | |||
102 | return Run; | 102 | return Run; |
103 | } else if( Run->assignedConnection() == 0 ) { | 103 | } else if( ! Run->IsUp && |
104 | Run->assignedConnection() == 0 ) { | ||
104 | // free | 105 | // free |
105 | best = Run; | 106 | best = Run; |
106 | } | 107 | } // UP or not assigned to us |
107 | } | 108 | } |