From c42b373199aaad6cf849ecf6c958738398f3dcbe Mon Sep 17 00:00:00 2001 From: Sungmin Kwak Date: Thu, 24 Sep 2015 15:38:50 +0900 Subject: [PATCH] Launch scim-helper-launcher in exceptional case there is a problem to read IME DB on boot-up. Once in a while, it seems both scim and scim-launcher processes couldn't read data from .ime_info.db on boot-up. /usr/lib/scim-1.0/scim-launcher -d -c simple -e none -f socket The engine list of scim-launcher is none. Then isf-panel-efl process read data successfully (even if DB is empty, panel reloads it) and try to launch helper ISE (set_active_ise). However, SocketFrontEnd::run_helper() can't be called because m_helpers.size() is zero in HelperManager::run_helper(). In order to launch scim-helper-launcher process, add a call to get_helper_list() in HelperManager::run_helper(). Change-Id: If076eed288b177e09c05b7c3e698622951ea289f --- ism/modules/frontend/scim_socket_frontend.cpp | 2 +- ism/src/scim_helper_manager.cpp | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ism/modules/frontend/scim_socket_frontend.cpp b/ism/modules/frontend/scim_socket_frontend.cpp index 86b15f6..1b16e49 100644 --- a/ism/modules/frontend/scim_socket_frontend.cpp +++ b/ism/modules/frontend/scim_socket_frontend.cpp @@ -2062,7 +2062,7 @@ SocketFrontEnd::socket_update_ise_list (int /*client_id*/) if (m_receive_trans.get_data (strName) && strName.length () > 0) { //std::cout << "ISE name list:" << strName << "\n"; //scim_split_string_list (name_list, strName); - + LOGD ("%s\n", strName.c_str ()); /* The strName has all appids but here module name is necessary. */ HelperInfo info; std::vector ime_info; diff --git a/ism/src/scim_helper_manager.cpp b/ism/src/scim_helper_manager.cpp index 036e035..9f5388a 100644 --- a/ism/src/scim_helper_manager.cpp +++ b/ism/src/scim_helper_manager.cpp @@ -49,6 +49,12 @@ #include "scim_private.h" #include "scim.h" #include "scim_utility.h" +#include + +#ifdef LOG_TAG +# undef LOG_TAG +#endif +#define LOG_TAG "SCIM_HELPER_MANAGER" namespace scim { @@ -100,10 +106,16 @@ public: void run_helper (const String &uuid, const String &config_name, const String &display) { SCIM_DEBUG_MAIN(1) << __FUNCTION__ << "...\n"; - if (!uuid.length () || !m_helpers.size ()) + if (!uuid.length ()) { + LOGW ("Invalid uuid"); return; - if (!m_socket_client.is_connected () && !open_connection ()) + } + if (!m_socket_client.is_connected () && !open_connection ()) { + LOGW ("m_socket_client connection failed"); return; + } + if (!m_helpers.size ()) + get_helper_list (); Transaction trans; for (int i = 0; i < 3; ++i) { -- 2.7.4