summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/opietooth2/OTGateway.h
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTGateway.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/opietooth2/OTGateway.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.h b/noncore/settings/networksettings2/opietooth2/OTGateway.h
index d97ef35..11c6b30 100644
--- a/noncore/settings/networksettings2/opietooth2/OTGateway.h
+++ b/noncore/settings/networksettings2/opietooth2/OTGateway.h
@@ -68,49 +68,49 @@ public :
static void releaseOTGateway( void );
// convert device type as class to name for that class
static const char * deviceTypeToName( int Cls );
// open bluetooth system
OTGateway( void );
// close bluetooth system
~OTGateway( void );
// get access to system device
OTDevice * getOTDevice();
// return true if this device needs enabling of bluetooth
bool needsEnabling();
// return true if system is running
bool isEnabled();
void setRefreshTimer( int MilleSecs );
// return socket to HCI raw layer
inline int getSocket()
{ return HciCtl; }
OTDriverList & getDriverList()
{ return AllDrivers; }
OTDriver * driver( int nr )
- { return AllDrivers[nr]; }
+ { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; }
void updateDrivers();
PANConnectionVector getPANConnections();
// scan neighbourhood using device
void scanNeighbourhood( OTDriver * D = 0 );
void stopScanOfNeighbourhood(void );
void setScanWith( OTDriver * D = 0 )
{ ScanWith = (D) ? D :
(AllDrivers.count() ) ? AllDrivers[0] : 0; }
OTDriver * scanWith( void )
{ return ScanWith; }
// get list of all detected peers
inline const PeerVector & peers( void )
{ return AllPeers; }
// ping peer to see if it is up
bool isPeerUp( const OTDeviceAddress & PAddr,
int timeoutInSec = 1,
int timeoutInUSec = 0,
int retry = 1 );
OTPeer * findPeer( const OTDeviceAddress & Addr );
void removePeer( OTPeer * P );
void addPeer( OTPeer * P );