-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTGateway.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTGateway.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp index e8137dd..1b61a2e 100644 --- a/noncore/settings/networksettings2/opietooth2/OTGateway.cpp +++ b/noncore/settings/networksettings2/opietooth2/OTGateway.cpp | |||
@@ -140,16 +140,17 @@ void OTGateway::SLOT_Disable() { | |||
140 | } | 140 | } |
141 | 141 | ||
142 | bool OTGateway::needsEnabling() { | 142 | bool OTGateway::needsEnabling() { |
143 | return getOTDevice()->needsAttach(); | 143 | return getOTDevice()->needsAttach(); |
144 | } | 144 | } |
145 | 145 | ||
146 | bool OTGateway::isEnabled() { | 146 | bool OTGateway::isEnabled() { |
147 | if( getOTDevice()->deviceNr() >= 0 && | 147 | if( getOTDevice()->deviceNr() >= 0 && |
148 | AllDrivers.count() != 0 && | ||
148 | driver( getOTDevice()->deviceNr() )->isUp() ) | 149 | driver( getOTDevice()->deviceNr() )->isUp() ) |
149 | return TRUE; | 150 | return TRUE; |
150 | 151 | ||
151 | // else check system | 152 | // else check system |
152 | return getOTDevice()->isAttached(); | 153 | return getOTDevice()->isAttached(); |
153 | } | 154 | } |
154 | 155 | ||
155 | void OTGateway::SLOT_ShowError( const QString & S ) { | 156 | void OTGateway::SLOT_ShowError( const QString & S ) { |
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 | |||
@@ -84,17 +84,17 @@ public : | |||
84 | void setRefreshTimer( int MilleSecs ); | 84 | void setRefreshTimer( int MilleSecs ); |
85 | // return socket to HCI raw layer | 85 | // return socket to HCI raw layer |
86 | inline int getSocket() | 86 | inline int getSocket() |
87 | { return HciCtl; } | 87 | { return HciCtl; } |
88 | 88 | ||
89 | OTDriverList & getDriverList() | 89 | OTDriverList & getDriverList() |
90 | { return AllDrivers; } | 90 | { return AllDrivers; } |
91 | OTDriver * driver( int nr ) | 91 | OTDriver * driver( int nr ) |
92 | { return AllDrivers[nr]; } | 92 | { return AllDrivers.count() == 0 ? 0 : AllDrivers[nr]; } |
93 | void updateDrivers(); | 93 | void updateDrivers(); |
94 | 94 | ||
95 | PANConnectionVector getPANConnections(); | 95 | PANConnectionVector getPANConnections(); |
96 | 96 | ||
97 | // scan neighbourhood using device | 97 | // scan neighbourhood using device |
98 | void scanNeighbourhood( OTDriver * D = 0 ); | 98 | void scanNeighbourhood( OTDriver * D = 0 ); |
99 | void stopScanOfNeighbourhood(void ); | 99 | void stopScanOfNeighbourhood(void ); |
100 | void setScanWith( OTDriver * D = 0 ) | 100 | void setScanWith( OTDriver * D = 0 ) |