From: Ji-hoon Lee Date: Tue, 8 Mar 2022 09:21:58 +0000 (+0900) Subject: Add engine load failure log messages to the ERROR group X-Git-Tag: submit/tizen/20220617.052105~7^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3ed38a11b22f9949a95aece412685b62b1785bc;p=platform%2Fcore%2Fuifw%2Fmulti-assistant-service.git Add engine load failure log messages to the ERROR group Change-Id: I341411c17a6c8511501d240039438df2a41faf31 --- diff --git a/plugins/wakeup-manager/src/wakeup_engine_manager.cpp b/plugins/wakeup-manager/src/wakeup_engine_manager.cpp index 307ff3c..7db926c 100644 --- a/plugins/wakeup-manager/src/wakeup_engine_manager.cpp +++ b/plugins/wakeup-manager/src/wakeup_engine_manager.cpp @@ -822,14 +822,15 @@ bool CWakeupEngineManager::on_wakeup_engine_command(string engine_name, mas_wake void CWakeupEngineManager::add_engine(string name, string path) { - MWR_LOGD("Name (%s), Filepath(%s)", name.c_str(), path.c_str()); + MWR_LOGE("Name (%s), Filepath(%s)", name.c_str(), path.c_str()); char* error = NULL; EngineInfo info; info.engine_handle = dlopen(path.c_str(), RTLD_LAZY); if (nullptr != (error = dlerror()) || nullptr == info.engine_handle) { - MWR_LOGD("[ERROR] Fail to dlopen(%s), error(%s)", path.c_str(), error); + MWR_LOGE("[ERROR] Fail to dlopen(%s), error(%s)", path.c_str(), error); if (info.engine_handle) dlclose(info.engine_handle); + info.engine_handle = nullptr; return; } @@ -915,6 +916,13 @@ void CWakeupEngineManager::add_engine(string name, string path) (wakeup_engine_set_dependency_module_command)dlsym(info.engine_handle, MA_WAKEUP_ENGINE_FUNC_SET_DEPENDENCY_MODULE_COMMAND); + if (info.interface.initialize == nullptr) { + MWR_LOGE("[ERROR] Initialize interface does not exist, skipping %s", path.c_str()); + if (info.engine_handle) dlclose(info.engine_handle); + info.engine_handle = nullptr; + return; + } + info.version = 0; info.engine_path = path; info.engine_name = name;