diff options
author | Fabian Bumberger <fbumberger@rim.com> | 2013-09-30 16:24:18 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-30 16:44:04 +0200 |
commit | e2c75b1ecb52b60879c6316a8bea838c23d24b0f (patch) | |
tree | 9cf0468084530d2595707c03d4d1bfa23853d100 /src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp | |
parent | ea413e54839872770d1f10e65cab4670b470063c (diff) |
Don't throw an error when a low energy device is discovered
Just ignore it
Change-Id: I7d8139f8c10cee0df4e2ebdc13bb76ee6bb8dda3
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp index c271a47f..d5feb3eb 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp @@ -50,6 +50,8 @@ #include <sys/pps.h> +#include <QFile> + #include <QtCore/private/qcore_unix_p.h> QT_BEGIN_NAMESPACE @@ -75,10 +77,15 @@ void QBluetoothServiceDiscoveryAgentPrivate::start(const QBluetoothAddress &addr qBBBluetoothDebug() << "Starting Service discovery for" << address.toString(); const char *filePath = QByteArray("/pps/services/bluetooth/remote_devices/").append(address.toString().toUtf8().constData()).constData(); if ((m_rdfd = qt_safe_open(filePath, O_RDONLY)) == -1) { - qWarning() << "Failed to open " << filePath; - error = QBluetoothServiceDiscoveryAgent::InputOutputError; - errorString = QStringLiteral("Failed to open remote device file"); - q->error(error); + if (QFile::exists(QLatin1String(filePath) + QLatin1String("-00")) || + QFile::exists(QLatin1String(filePath) + QLatin1String("-01"))) { + qBBBluetoothDebug() << "LE device discovered...skipping"; + } else { + qWarning() << "Failed to open " << filePath; + error = QBluetoothServiceDiscoveryAgent::InputOutputError; + errorString = QStringLiteral("Failed to open remote device file"); + q->error(error); + } _q_serviceDiscoveryFinished(); return; } else { |