Diffstat (limited to 'noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/opietooth2/OTHCISocket.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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 | |||
@@ -31,25 +31,25 @@ OTHCISocket::OTHCISocket( OTDriver * D ) : | |||
31 | 31 | ||
32 | OTHCISocket::~OTHCISocket() { | 32 | OTHCISocket::~OTHCISocket() { |
33 | close(); | 33 | close(); |
34 | } | 34 | } |
35 | 35 | ||
36 | void OTHCISocket::close() { | 36 | void OTHCISocket::close() { |
37 | owarn << "OTHCISocket::close()" << oendl; | 37 | odebug << "OTHCISocket::close()" << oendl; |
38 | if( HCIReadNotifier ) { | 38 | if( HCIReadNotifier ) { |
39 | delete HCIReadNotifier; | 39 | delete HCIReadNotifier; |
40 | } | 40 | } |
41 | 41 | ||
42 | if( HCISocket.isValid() ) { | 42 | if( HCISocket.isValid() ) { |
43 | HCISocket.close(); | 43 | HCISocket.close(); |
44 | } | 44 | } |
45 | } | 45 | } |
46 | 46 | ||
47 | bool OTHCISocket::open() { | 47 | bool OTHCISocket::open() { |
48 | 48 | ||
49 | owarn << "OTHCISocket::open()" << oendl; | 49 | odebug << "OTHCISocket::open()" << oendl; |
50 | int s; | 50 | int s; |
51 | 51 | ||
52 | s = ::socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI); | 52 | s = ::socket(AF_BLUETOOTH, SOCK_RAW, BTPROTO_HCI); |
53 | 53 | ||
54 | if (s < 0) { | 54 | if (s < 0) { |
55 | emit error( tr( "Error creating socket on %1 : %2 %3"). | 55 | emit error( tr( "Error creating socket on %1 : %2 %3"). |
@@ -148,13 +148,13 @@ void OTHCISocket::slotSocketActivated() { | |||
148 | databuf.duplicate((char*)(buf+3), len); | 148 | databuf.duplicate((char*)(buf+3), len); |
149 | emit event(eventCode, databuf); | 149 | emit event(eventCode, databuf); |
150 | if (eventCode == EVT_CMD_STATUS) { | 150 | if (eventCode == EVT_CMD_STATUS) { |
151 | updateStatus( databuf ); | 151 | updateStatus( databuf ); |
152 | } | 152 | } |
153 | } else { | 153 | } else { |
154 | owarn << "Error reading hci packet: packetSize(" | 154 | odebug << "Error reading hci packet: packetSize(" |
155 | << psize | 155 | << psize |
156 | << ")-3 != dataSize(" | 156 | << ")-3 != dataSize(" |
157 | << len | 157 | << len |
158 | << ")" | 158 | << ")" |
159 | << oendl; | 159 | << oendl; |
160 | } | 160 | } |
@@ -180,13 +180,13 @@ void OTHCISocket::updateStatus(const QByteArray& data) { | |||
180 | LastStatus = status; | 180 | LastStatus = status; |
181 | LastStatusOgf = cmd_opcode_ogf(opcode); | 181 | LastStatusOgf = cmd_opcode_ogf(opcode); |
182 | LastStatusOcf = cmd_opcode_ocf(opcode); | 182 | LastStatusOcf = cmd_opcode_ocf(opcode); |
183 | } | 183 | } |
184 | 184 | ||
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(); |
188 | } | 188 | } |
189 | 189 | ||
190 | void OTHCISocket::readEvent() { | 190 | void OTHCISocket::readEvent() { |
191 | 191 | ||
192 | if (HCIReadNotifier) { | 192 | if (HCIReadNotifier) { |
@@ -227,13 +227,13 @@ bool OTHCISocket::readStatus( unsigned char ogf, | |||
227 | 227 | ||
228 | timer.start(timeout_ms, true); | 228 | timer.start(timeout_ms, true); |
229 | BStatusSet = false; | 229 | BStatusSet = false; |
230 | 230 | ||
231 | while (timer.isActive() && HCISocket.isValid()) { | 231 | while (timer.isActive() && HCISocket.isValid()) { |
232 | 232 | ||
233 | owarn << "OTHCISocket::readStatus()" << oendl; | 233 | odebug << "OTHCISocket::readStatus()" << oendl; |
234 | bool timeout = false; | 234 | bool timeout = false; |
235 | 235 | ||
236 | if( HCISocket.bytesAvailable() == 0) { | 236 | if( HCISocket.bytesAvailable() == 0) { |
237 | int rv = HCISocket.waitForMore(timeout_ms); | 237 | int rv = HCISocket.waitForMore(timeout_ms); |
238 | timeout = (rv == 0); | 238 | timeout = (rv == 0); |
239 | } | 239 | } |
@@ -243,25 +243,25 @@ bool OTHCISocket::readStatus( unsigned char ogf, | |||
243 | } | 243 | } |
244 | 244 | ||
245 | if( BStatusSet == true && | 245 | if( BStatusSet == true && |
246 | ogf == LastStatusOgf && | 246 | ogf == LastStatusOgf && |
247 | ocf == LastStatusOcf) { | 247 | ocf == LastStatusOcf) { |
248 | *status = LastStatus; | 248 | *status = LastStatus; |
249 | owarn << "OTHCISocket::readStatus(ogf=" | 249 | odebug << "OTHCISocket::readStatus(ogf=" |
250 | << ogf | 250 | << ogf |
251 | << ",ocf=" | 251 | << ",ocf=" |
252 | << ocf | 252 | << ocf |
253 | << ",timeout=" | 253 | << ",timeout=" |
254 | << LastStatus | 254 | << LastStatus |
255 | << ")" | 255 | << ")" |
256 | << oendl; | 256 | << oendl; |
257 | return true; | 257 | return true; |
258 | } | 258 | } |
259 | } | 259 | } |
260 | 260 | ||
261 | owarn << "OTHCISocket::readStatus(ogf=" | 261 | odebug << "OTHCISocket::readStatus(ogf=" |
262 | << ogf | 262 | << ogf |
263 | << ",ocf=" | 263 | << ",ocf=" |
264 | << ocf | 264 | << ocf |
265 | << ",timeout=" | 265 | << ",timeout=" |
266 | << LastStatus | 266 | << LastStatus |
267 | << ") : timeout " | 267 | << ") : timeout " |