diff options
author | Javier <maemo@javispedro.com> | 2014-07-26 17:54:59 +0200 |
---|---|---|
committer | Javier <maemo@javispedro.com> | 2014-07-26 17:54:59 +0200 |
commit | 21b56895cb60e4d68b9e79b44b18cdb79b747e8c (patch) | |
tree | 44a6a635948a711843a745b48d61f376d3503b71 /gatosocket.cpp | |
parent | f15a824a143da472325c0aaf2baaedd827e655e6 (diff) | |
download | libgato-21b56895cb60e4d68b9e79b44b18cdb79b747e8c.tar.gz libgato-21b56895cb60e4d68b9e79b44b18cdb79b747e8c.zip |
reduce scanning duty cycle to allow for BT coex
Diffstat (limited to 'gatosocket.cpp')
-rw-r--r-- | gatosocket.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gatosocket.cpp b/gatosocket.cpp index c29b154..5d30c6f 100644 --- a/gatosocket.cpp +++ b/gatosocket.cpp @@ -20,8 +20,6 @@ #include <QtCore/QDebug> -#include <limits> - #include <unistd.h> #include <errno.h> #include <sys/socket.h> @@ -167,7 +165,7 @@ void GatoSocket::writeNotify() int soerror = 0; socklen_t len = sizeof(soerror); if (::getsockopt(fd, SOL_SOCKET, SO_ERROR, &soerror, &len) != 0) { - // An error while reading the error? + // An error while reading the error qErrnoWarning("Could not get L2 socket options"); close(); return; @@ -180,6 +178,12 @@ void GatoSocket::writeNotify() s = StateConnected; emit connected(); + + bt_security bt_sec; + len = sizeof(bt_sec); + if (::getsockopt(fd, SOL_BLUETOOTH, BT_SECURITY, &bt_sec, &len) == 0) { + qDebug() << "Established a bluetooth channel with security level " << bt_sec.level; + } } else if (s == StateConnected) { if (!writeQueue.isEmpty()) { if (transmit(writeQueue.head())) { |