diff options
author | Kalle Viironen <kalle.viironen@digia.com> | 2014-07-04 09:51:36 +0300 |
---|---|---|
committer | Kalle Viironen <kalle.viironen@digia.com> | 2014-07-04 09:51:40 +0300 |
commit | a0816ae05210bdfdd149cd67938f64b151fa23c0 (patch) | |
tree | 5bfd1eb1f3513444f536052809ee2032f29f503b /src/imports/wifi/qwifimanager.cpp | |
parent | 5cdc15a7b82b7adfd4c5cae85ffb4327593dd076 (diff) | |
parent | 64164764fdfe9ed736b7367d573c0daa026b777f (diff) |
Merge commit '64164764fdfe9ed736b7367d573c0daa026b777f' into releaseQtEE_v3.1.0
* commit '64164764fdfe9ed736b7367d573c0daa026b777f':
Doc: ChangeLog for 3.1.0 release
Doc: Android-specific instructions for Qt Creator Kit setup
Doc: Add note about crash message when closing an application
Fix #ifdef for Android detection
Doc: Bump version to 3.1.0
Doc: Update the Supported Platforms page
Doc: Fix path for sabre install
doc: add documentation for Toradex Apalis iMX6
Doc: injection to eAndroid reference devices
Fix Wifi issues on Android 4.4.2
Don't hardcode interface name in getIPAddress()
Doc: Update the list of supported platforms
Add plugins.qmltypes for Wi-Fi library
Change-Id: I73af0af038f8bf9e5f10387b558c428f7a23461c
Diffstat (limited to 'src/imports/wifi/qwifimanager.cpp')
-rw-r--r-- | src/imports/wifi/qwifimanager.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 65073f1..8eec3e0 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -618,14 +618,21 @@ QByteArray QWifiManager::call(const char *command) const { char data[2048]; size_t len = sizeof(data) - 1; // -1: room to add a 0-terminator - if (q_wifi_command(m_interface.constData(), command, data, &len) < 0) { - qWarning("QWifiManager: call failed: %s", command); + QByteArray cmd; +#ifdef Q_OS_ANDROID +#if !(Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR < 4) + cmd.append("IFNAME=").append(m_interface).append(" "); +#endif +#endif + cmd.append(command); + if (q_wifi_command(m_interface.constData(), cmd.constData(), data, &len) < 0) { + qWarning("QWifiManager: call failed: %s", cmd.constData()); return QByteArray(); } if (len < sizeof(data)) data[len] = 0; QByteArray result = QByteArray::fromRawData(data, len); - if (QT_WIFI_DEBUG) qDebug("QWifiManager::call: %s ==>\n%s", command, result.constData()); + if (QT_WIFI_DEBUG) qDebug("QWifiManager::call: %s ==>\n%s", cmd.constData(), result.constData()); return result; } |