diff --git a/hal/src/WifiHal.h b/hal/src/WifiHal.h index b2511503..d4f0a51c 100644 --- a/hal/src/WifiHal.h +++ b/hal/src/WifiHal.h @@ -28,7 +28,7 @@ public: private: bool CheckWlan0IfExist(void); -private: +protected: bool mInitRunning; }; #endif \ No newline at end of file diff --git a/middleware/AppManager/src/AppManager.cpp b/middleware/AppManager/src/AppManager.cpp index c4a8ad63..cc620dc8 100644 --- a/middleware/AppManager/src/AppManager.cpp +++ b/middleware/AppManager/src/AppManager.cpp @@ -176,7 +176,11 @@ void AppManager::WifiApModeInit(const AppParam ¶m) * @brief This interface depends on hardware and may block. It is necessary to ensure that hardware interface * blocking does not cause the main thread to block. */ - wifi->OpenApMode(); + StatusCode code = wifi->OpenApMode(); + if (!IsCodeOK(code)) { + LogError("OpenApMode failed.\n"); + return; + } if (false == mInitRuning) { LogWarning("AppManager init stop.\n"); return;