diff options
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; } |