diff options
author | Javier <dev.git@javispedro.com> | 2015-12-24 19:04:04 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-12-24 19:04:04 +0100 |
commit | 14d20babe395e52d220bbc27e91cec2fddd1ed0f (patch) | |
tree | 4cd71caf6b0b8a8e4be7d4d3fb1306536a726346 /sapbtpeer.cc | |
parent | 309947a4316a94f4c5d43c9b39b733cc3bbab459 (diff) | |
download | sapd-14d20babe395e52d220bbc27e91cec2fddd1ed0f.tar.gz sapd-14d20babe395e52d220bbc27e91cec2fddd1ed0f.zip |
still testing sap control flow
Diffstat (limited to 'sapbtpeer.cc')
-rw-r--r-- | sapbtpeer.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sapbtpeer.cc b/sapbtpeer.cc index bf3bddb..188c37b 100644 --- a/sapbtpeer.cc +++ b/sapbtpeer.cc @@ -5,7 +5,7 @@ #include "sapsocket.h" #include "sapbtpeer.h" -#define PROTO_DEBUG 1 +#define PROTO_DEBUG 0 SAPBTPeer::SAPBTPeer(SAProtocol::Role role, QBluetoothSocket *socket, QObject *parent) : SAPPeer(role, socket->localAddress().toString(), socket->peerAddress().toString(), parent), @@ -137,7 +137,7 @@ void SAPBTPeer::handleFrame(const QByteArray &data) handleDataFrame(frame); break; case SAProtocol::FrameControl: - qWarning() << "Got control frame, what to do?"; + handleControlFrame(frame); break; default: qWarning() << "Unknown frame type" << frame.type; @@ -153,6 +153,13 @@ void SAPBTPeer::handleDataFrame(const SAProtocol::Frame &frame) handleSessionData(frame.sessionId, frame.data); } +void SAPBTPeer::handleControlFrame(const SAProtocol::Frame &frame) +{ + Q_ASSERT(frame.type == SAProtocol::FrameControl); + + handleSessionControl(frame.sessionId, frame.data); +} + void SAPBTPeer::handleAuthenticationFrame(const QByteArray &data) { SAProtocol::SecurityFrame sframe = SAProtocol::unpackSecurityFrame(data); |