Fix lock issue when getting vconf value 84/143884/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 11 Aug 2017 09:35:36 +0000 (18:35 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sat, 12 Aug 2017 05:44:15 +0000 (14:44 +0900)
Calling vconf_get_XXX function in vconf changed callback leads to lock up.
vconf_keynode_get_XXX function would be correct usage.

Change-Id: I7cae861225c770d19900d9d072888546338486e9
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/e_mod_main.c

index d1b1b05b1eec78e2e9931602f7e84e60b2530fff..68bea87f97b18bb58f9142a789fbf2264dd284bd 100644 (file)
@@ -265,8 +265,10 @@ _input_panel_hide(struct wl_client *client, struct wl_resource *resource, Eina_B
 static void
 _keyboard_mode_changed_cb(keynode_t *key, void* data)
 {
-   int val = 0;
-   if (vconf_get_bool(VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, &val) == 0)
+   bool val = vconf_keynode_get_bool(key);
+   LOGD("keyboard mode : %d\n", val);
+
+   if (val == false)
      {
         if (val == 0)
           {
@@ -285,7 +287,8 @@ static void
 _display_language_changed_cb(keynode_t *key, void* data)
 {
    int loop;
-   char *language = vconf_get_str(VCONFKEY_LANGSET);
+   char *language = vconf_keynode_get_str(key);
+   LOGD("language : %s\n", language);
 
    /* Just in case we did not find any matching language string */
    g_keymap_index = 0;
@@ -298,7 +301,6 @@ _display_language_changed_cb(keynode_t *key, void* data)
                   g_keymap_index = loop;
                }
           }
-        free(language);
      }
    /* We do not want to change the current keymap related behavior in TV profile for now */
 #ifndef _TV