Launch scim-helper-launcher in exceptional case there is a problem to read IME DB... 17/49717/1
authorSungmin Kwak <sungmin.kwak@samsung.com>
Thu, 24 Sep 2015 06:38:50 +0000 (15:38 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Mon, 19 Oct 2015 11:46:36 +0000 (20:46 +0900)
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
ism/src/scim_helper_manager.cpp

index 86b15f6..1b16e49 100644 (file)
@@ -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<ImeInfoDB> ime_info;
index 036e035..9f5388a 100644 (file)
 #include "scim_private.h"
 #include "scim.h"
 #include "scim_utility.h"
+#include <dlog.h>
+
+#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) {