From 1905841f4008a58932368a7099e370e5758544c4 Mon Sep 17 00:00:00 2001 From: Javier Date: Sun, 5 Jun 2016 00:51:39 +0200 Subject: initial attempts to work with paired devices --- gatoattclient.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'gatoattclient.cpp') diff --git a/gatoattclient.cpp b/gatoattclient.cpp index 00dd9d0..b8bdc17 100644 --- a/gatoattclient.cpp +++ b/gatoattclient.cpp @@ -75,8 +75,7 @@ static QByteArray remove_method_signature(const char *sig) } GatoAttClient::GatoAttClient(QObject *parent) : - QObject(parent), socket(new GatoSocket(this)), cur_mtu(ATT_DEFAULT_LE_MTU), next_id(1), - required_sec(GatoSocket::SecurityLow) + QObject(parent), socket(new GatoSocket(this)), cur_mtu(ATT_DEFAULT_LE_MTU), next_id(1) { connect(socket, SIGNAL(connected()), SLOT(handleSocketConnected())); connect(socket, SIGNAL(disconnected()), SLOT(handleSocketDisconnected())); @@ -92,9 +91,8 @@ GatoSocket::State GatoAttClient::state() const return socket->state(); } -bool GatoAttClient::connectTo(const GatoAddress &addr, GatoSocket::SecurityLevel sec_level) +bool GatoAttClient::connectTo(const GatoAddress &addr) { - required_sec = sec_level; return socket->connectTo(addr, ATT_CID); } @@ -110,7 +108,6 @@ GatoSocket::SecurityLevel GatoAttClient::securityLevel() const bool GatoAttClient::setSecurityLevel(GatoSocket::SecurityLevel level) { - required_sec = level; return socket->setSecurityLevel(level); } @@ -563,10 +560,6 @@ QList GatoAttClient::parseAttributeGroupData( void GatoAttClient::handleSocketConnected() { - if (socket->securityLevel() < required_sec) { - socket->setSecurityLevel(required_sec); - } - requestExchangeMTU(ATT_MAX_LE_MTU, this, SLOT(handleServerMTU(quint16))); emit connected(); } -- cgit v1.2.3