summaryrefslogtreecommitdiff
path: root/sapbtpeer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sapbtpeer.cc')
-rw-r--r--sapbtpeer.cc11
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);