Index: sources/device/DeviceModels.cpp =================================================================== diff -u -r25c40729f182b567f22e01a4c6f3eda7ccaac04d -rf0c8b8720a2e314268445a4a20fe701292026f6f --- sources/device/DeviceModels.cpp (.../DeviceModels.cpp) (revision 25c40729f182b567f22e01a4c6f3eda7ccaac04d) +++ sources/device/DeviceModels.cpp (.../DeviceModels.cpp) (revision f0c8b8720a2e314268445a4a20fe701292026f6f) @@ -290,7 +290,7 @@ // apply returned value in case the passed value is valid (type, range) // regardless of the exit code (success, fail) lApply: - _data.mWifiInfo= val; + _data.mWifiInfo = val; goto lOut; // immediate exit on fail exitcode and invalid returned value. @@ -320,12 +320,14 @@ ok = true; // 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 + 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 = _data.mConnect ? Device::DeviceError::eDevice_ConnectWifi_Error : + Device::DeviceError::eDevice_DisconnectWifi_Error; goto lApply; } // there still a valid value // Now everything is good to extract the data _data.mAccepted = true; - _data.mMessage = QObject::tr("The WiFi (Dis)Connection is complete.") ; goto lOut ; // normal return + _data.mMessage = _data.mConnect ? QObject::tr("The WiFi Connection is complete.") : + QObject::tr("The WiFi Disconnection is complete.") ; goto lOut ; // normal return // apply returned value in case the passed value is valid (type, range) // regardless of the exit code (success, fail)