diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-01-29 10:18:26 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-30 14:23:09 +0100 |
commit | 7d4f4c3083d565af00f1564ae80e5cbfbc338bd5 (patch) | |
tree | 34bf776a0aaa2d31cd1238140f6c4bfdbd7746b6 /src/bluetooth/qbluetoothserver_bluez.cpp | |
parent | 039982cfa41515fbf559a4e3645aab14f77ee447 (diff) |
Use qt_error_string rather than strerror.
Change-Id: Ide3f00cacd7a42e99823441a45609f8e50063fce
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/bluetooth/qbluetoothserver_bluez.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothserver_bluez.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bluetooth/qbluetoothserver_bluez.cpp b/src/bluetooth/qbluetoothserver_bluez.cpp index cf50d140..0b504d9a 100644 --- a/src/bluetooth/qbluetoothserver_bluez.cpp +++ b/src/bluetooth/qbluetoothserver_bluez.cpp @@ -257,7 +257,7 @@ void QBluetoothServer::setSecurityFlags(QBluetooth::SecurityFlags security) if (setsockopt(d->socket->socketDescriptor(), SOL_RFCOMM, RFCOMM_LM, &lm, sizeof(lm)) < 0){ qCWarning(QT_BT_BLUEZ) << "Failed to set socket option, closing socket for safety" << errno; - qCWarning(QT_BT_BLUEZ) << "Error: " << strerror(errno); + qCWarning(QT_BT_BLUEZ) << "Error: " << qt_error_string(errno); d->m_lastError = InputOutputError; emit error(d->m_lastError); d->socket->close(); @@ -274,7 +274,7 @@ void QBluetoothServer::setSecurityFlags(QBluetooth::SecurityFlags security) if (setsockopt(d->socket->socketDescriptor(), SOL_L2CAP, L2CAP_LM, &lm, sizeof(lm)) < 0){ qCWarning(QT_BT_BLUEZ) << "Failed to set socket option, closing socket for safety" << errno; - qCWarning(QT_BT_BLUEZ) << "Error: " << strerror(errno); + qCWarning(QT_BT_BLUEZ) << "Error: " << qt_error_string(errno); d->m_lastError = InputOutputError; emit error(d->m_lastError); d->socket->close(); @@ -293,7 +293,7 @@ QBluetooth::SecurityFlags QBluetoothServer::securityFlags() const if (d->serverType == QBluetoothServiceInfo::RfcommProtocol) { if (getsockopt(d->socket->socketDescriptor(), SOL_RFCOMM, RFCOMM_LM, &lm, (socklen_t *)&len) < 0) { - qCWarning(QT_BT_BLUEZ) << "Failed to get security flags" << strerror(errno); + qCWarning(QT_BT_BLUEZ) << "Failed to get security flags" << qt_error_string(errno); return QBluetooth::NoSecurity; } @@ -310,7 +310,7 @@ QBluetooth::SecurityFlags QBluetoothServer::securityFlags() const security |= QBluetooth::Authorization; } else { if (getsockopt(d->socket->socketDescriptor(), SOL_L2CAP, L2CAP_LM, &lm, (socklen_t *)&len) < 0) { - qCWarning(QT_BT_BLUEZ) << "Failed to get security flags" << strerror(errno); + qCWarning(QT_BT_BLUEZ) << "Failed to get security flags" << qt_error_string(errno); return QBluetooth::NoSecurity; } |