Index: sources/device/DeviceController.cpp =================================================================== diff -u -r574c7c5fb48b1fcb72337f5fb4c0119a20288815 -rdb52d097addadd2eef6102340778be143ee81df4 --- sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision 574c7c5fb48b1fcb72337f5fb4c0119a20288815) +++ sources/device/DeviceController.cpp (.../DeviceController.cpp) (revision db52d097addadd2eef6102340778be143ee81df4) @@ -30,7 +30,6 @@ #include "CloudSyncController.h" #include "ApplicationController.h" #include "FileHandler.h" -#include "DeviceModels.h" #include "Settings.h" #include "encryption.h" @@ -1362,29 +1361,17 @@ */ void DeviceController::processWifiListResponse(int vExitCode, QProcess::ExitStatus vStatus, QProcess::ProcessChannel vChannel) { - //DEBUG - qDebug() << " 1 ---------- " << __FUNCTION__ << vExitCode << vStatus << vChannel; - + //DEBUG qDebug() << " 1 ---------- " << __FUNCTION__ << vExitCode << vStatus << vChannel; + static MDeviceWifiListResponse model; if ( vExitCode < 0 ) { switch (vChannel) { - case QProcess::StandardOutput : processWifiListReadyOut(); return; - case QProcess::StandardError : processWifiListReadyErr(); return; + case QProcess::StandardOutput : processWifiListReadyOut(model); break; + case QProcess::StandardError : processWifiListReadyErr(model); break; } } + else { + processWifiListComplete(model, vExitCode, vStatus); + } - MDeviceWifiListResponse model; - model._data.mCompleted = true; - QByteArray deviceInfo; - if ( vStatus ) vExitCode = Device::DeviceError::eDevice_Scripts_Error_Status; - else deviceInfo = _processWifiList.readAll(); - model.fromByteArray( deviceInfo, &vExitCode ); emit didAttributeResponse(model.data()); - - bool ok = ! vStatus; - - // log error and exit - if ( ! ok ) { - LOG_DEBUG(QString("WiFi list scan failed [%1]").arg(vExitCode)); - } - return; }