deregistering vconf value change callback on module shutdown 29/225229/1
authorLukasz Oleksak <l.oleksak@samsung.com>
Tue, 18 Feb 2020 08:08:02 +0000 (09:08 +0100)
committerLukasz Oleksak <l.oleksak@samsung.com>
Tue, 18 Feb 2020 08:08:02 +0000 (09:08 +0100)
Change-Id: Ie1e4595aa3870119b5bf56df8cffd8e00a6983fc

src/e_mod_main.c

index 1a5a07a..4b48e30 100644 (file)
@@ -668,20 +668,35 @@ Eina_Bool _e_mod_atspi_vconf_init(void)
    return EINA_TRUE;
 }
 
+void _e_mod_atspi_vconf_shutdown(void)
+{
+   int ret;
+
+   _e_mod_submodules_shutdown();
+
+   ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, screen_reader_cb);
+   if(ret != 0)
+     {
+       ERROR("Could not remove information level callback\n");
+     }
+}
+
 EAPI void *
 e_modapi_init(E_Module *m)
 {
    _e_mod_log_init();
    if (_e_mod_atspi_dbus_init())
    {
-     ERROR("Dbus initialization failed.");
-     return NULL;
+      ERROR("Dbus initialization failed.");
+      _e_mod_log_shutdown();
+      return NULL;
    }
 
    if (!_e_mod_atspi_vconf_init())
    {
-      _e_mod_atspi_dbus_shutdown();
       ERROR("AT-SPI vconf initialization failed.");
+      _e_mod_atspi_dbus_shutdown();
+      _e_mod_log_shutdown();
       return NULL;
    }
    e_accessibility_conf_init(m);
@@ -693,9 +708,9 @@ EAPI int
 e_modapi_shutdown(E_Module *m EINA_UNUSED)
 {
    e_accessibility_conf_shutdown();
-   _e_mod_log_shutdown();
+   _e_mod_atspi_vconf_shutdown();
    _e_mod_atspi_dbus_shutdown();
-
+   _e_mod_log_shutdown();
    return 1;
 }