Index: sources/device/DeviceModels.cpp =================================================================== diff -u -re7c552d59935eb2a63f3dcee0a5161d19f5c7ac5 -r6c1e7ff26ce49512b1d63623f7e8dd61dea831a0 --- sources/device/DeviceModels.cpp (.../DeviceModels.cpp) (revision e7c552d59935eb2a63f3dcee0a5161d19f5c7ac5) +++ sources/device/DeviceModels.cpp (.../DeviceModels.cpp) (revision 6c1e7ff26ce49512b1d63623f7e8dd61dea831a0) @@ -317,6 +317,13 @@ _data.mAccepted = false; _data.mReason = Device::DeviceError::eDevice_OK; + // set as default if the val is invalid. + _data.mConnectResult = ""; + + // get the value + QString val = vByteArray; + ok = ! val.isNull() && val.isSimpleText(); + // check if the vExitCode passed and it has a value other than zero if ( ! ok ){ _data.mReason = Device::DeviceError::eDevice_Scripts_Error_Incorrect_Rsp_Type ; goto lError; } // there is not a valid value if ( vExitCode && *vExitCode ){ _data.mReason = Device::DeviceError::eDevice_ConnectWifi_Error ; goto lApply; } // there still a valid value @@ -328,6 +335,7 @@ // apply returned value in case the passed value is valid (type, range) // regardless of the exit code (success, fail) lApply: + _data.mConnectResult = val; goto lOut; // immediate exit on fail exitcode and invalid returned value.