summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTGateway.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTGateway.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.cpp14
1 files changed, 7 insertions, 7 deletions
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
@@ -151,13 +151,13 @@ bool OTGateway::isEnabled() {
151 // else check system 151 // else check system
152 return getOTDevice()->isAttached(); 152 return getOTDevice()->isAttached();
153} 153}
154 154
155void OTGateway::SLOT_ShowError( const QString & S ) { 155void OTGateway::SLOT_ShowError( const QString & S ) {
156 156
157 owarn << S << oendl; 157 odebug << S << oendl;
158 158
159 if( ErrorConnectCount > 0 ) { 159 if( ErrorConnectCount > 0 ) {
160 // pass error 160 // pass error
161 emit error( QString( "<p>" ) + S + "</p>" ); 161 emit error( QString( "<p>" ) + S + "</p>" );
162 return; 162 return;
163 } 163 }
@@ -207,13 +207,13 @@ void OTGateway::timerEvent( QTimerEvent * ) {
207 } 207 }
208 } 208 }
209 } 209 }
210} 210}
211 211
212void OTGateway::SLOT_Enabled( int id, bool Up ) { 212void 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 ) {
215 // device is up -> detect it 215 // device is up -> detect it
216 updateDrivers(); 216 updateDrivers();
217 if( (unsigned)id >= AllDrivers.count() ) { 217 if( (unsigned)id >= AllDrivers.count() ) {
218 // to make sure that the driver really IS detected 218 // to make sure that the driver really IS detected
219 AllDrivers[id]->bringUp(); 219 AllDrivers[id]->bringUp();
@@ -224,13 +224,13 @@ void OTGateway::SLOT_Enabled( int id, bool Up ) {
224 224
225void OTGateway::updateDrivers( void ) { 225void OTGateway::updateDrivers( void ) {
226 OTDriver * D; 226 OTDriver * D;
227 227
228 AllDrivers.update(); 228 AllDrivers.update();
229 229
230 owarn << "updated drivers. now " << AllDrivers.count() << oendl; 230 odebug << "updated drivers. now " << AllDrivers.count() << oendl;
231 231
232 // connect signals for each driver 232 // connect signals for each driver
233 for( unsigned int i = 0; 233 for( unsigned int i = 0;
234 i < AllDrivers.count(); 234 i < AllDrivers.count();
235 i ++ ) { 235 i ++ ) {
236 D = AllDrivers[i]; 236 D = AllDrivers[i];
@@ -262,13 +262,13 @@ void OTGateway::updateDrivers( void ) {
262 setScanWith( 0 ); 262 setScanWith( 0 );
263 263
264 emit driverListChanged(); 264 emit driverListChanged();
265} 265}
266 266
267void OTGateway::SLOT_DriverDisappeared( OTDriver * D ) { 267void 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();
270} 270}
271 271
272void OTGateway::scanNeighbourhood( OTDriver * D ) { 272void OTGateway::scanNeighbourhood( OTDriver * D ) {
273 273
274 if( Scanning ) { 274 if( Scanning ) {
@@ -315,13 +315,13 @@ OTDriver* OTGateway::findDriver( const OTDeviceAddress & Addr ) {
315} 315}
316 316
317void OTGateway::SLOT_PeerDetected( OTPeer * P, bool IsNew ) { 317void OTGateway::SLOT_PeerDetected( OTPeer * P, bool IsNew ) {
318 318
319 if( IsNew ) { 319 if( 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 );
323 } 323 }
324 324
325 emit detectedPeer( P, IsNew ); 325 emit detectedPeer( P, IsNew );
326} 326}
327 327
@@ -381,20 +381,20 @@ PANConnectionVector OTGateway::getPANConnections( void ) {
381 struct bnep_conninfo ci[48]; 381 struct bnep_conninfo ci[48];
382 382
383 V.setAutoDelete(TRUE); 383 V.setAutoDelete(TRUE);
384 384
385 int ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP); 385 int ctl = socket(PF_BLUETOOTH, SOCK_RAW, BTPROTO_BNEP);
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;
389 } 389 }
390 390
391 req.cnum = 48; 391 req.cnum = 48;
392 req.ci = ci; 392 req.ci = ci;
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 );
396 return V; 396 return V;
397 } 397 }
398 398
399 for ( unsigned i=0; i < req.cnum; i++) { 399 for ( unsigned i=0; i < req.cnum; i++) {
400 V.resize( V.size() + 1 ); 400 V.resize( V.size() + 1 );