diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-10-15 12:21:06 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-10-16 08:02:37 +0000 |
commit | b3fbfe3f525c2b5f97e2dbcf2ffbbcd6ae94c0ff (patch) | |
tree | 59e657a18c0f17626778fdc1a42604e621dee26f | |
parent | cbc70bc3a2ea7fb545c2d9cfb8914d50c1ba6475 (diff) | |
download | qtconnectivity-b3fbfe3f525c2b5f97e2dbcf2ffbbcd6ae94c0ff.tar.gz |
Bluetooth: Fix value of an ATT error type.
Change-Id: I2239624dd411daf400e987ec092be48805b8fa57
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/bluetooth/qlowenergycontroller_bluez.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp index a7b2e794..18d0f5a1 100644 --- a/src/bluetooth/qlowenergycontroller_bluez.cpp +++ b/src/bluetooth/qlowenergycontroller_bluez.cpp @@ -106,8 +106,10 @@ #define ATT_ERROR_INVAL_ATTR_VALUE_LEN 0x0D #define ATT_ERROR_UNLIKELY 0x0E #define ATT_ERROR_INSUF_ENCRYPTION 0x0F -#define ATT_ERROR_APPLICATION 0x10 +#define ATT_ERROR_UNSUPPRTED_GROUP_TYPE 0x10 #define ATT_ERROR_INSUF_RESOURCES 0x11 +#define ATT_ERROR_APPLICATION_START 0x80 +#define ATT_ERROR_APPLICATION_END 0x9f #define APPEND_VALUE true #define NEW_VALUE false @@ -176,12 +178,16 @@ static void dumpErrorInformation(const QByteArray &response) errorString = QStringLiteral("unlikely error"); break; case ATT_ERROR_INSUF_ENCRYPTION: errorString = QStringLiteral("needs encryption - permissions"); break; - case ATT_ERROR_APPLICATION: - errorString = QStringLiteral("application error"); break; + case ATT_ERROR_UNSUPPRTED_GROUP_TYPE: + errorString = QStringLiteral("unsupported group type"); break; case ATT_ERROR_INSUF_RESOURCES: errorString = QStringLiteral("insufficient resources to complete request"); break; default: - errorString = QStringLiteral("unknown error code"); break; + if (errorCode >= ATT_ERROR_APPLICATION_START && errorCode <= ATT_ERROR_APPLICATION_END) + errorString = QStringLiteral("application error"); + else + errorString = QStringLiteral("unknown error code"); + break; } qCDebug(QT_BT_BLUEZ) << "Error1:" << errorString |