ecore_con: Properly shutdown and unregister log domain
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 18 Dec 2017 03:04:05 +0000 (12:04 +0900)
committerWonki Kim <wonki_.kim@samsung.com>
Wed, 10 Jan 2018 11:08:13 +0000 (20:08 +0900)
I believe the comment saying we should not unregister the log domain is
invalid as we try to flush the pending ecore events.

src/lib/ecore_con/ecore_con.c

index f071cd9..a396fa9 100644 (file)
@@ -92,13 +92,10 @@ ecore_con_init(void)
    if (!ecore_init())
      goto ecore_err;
 
+   _ecore_con_log_dom = eina_log_domain_register
+         ("ecore_con", ECORE_CON_DEFAULT_LOG_COLOR);
    if (_ecore_con_log_dom < 0)
-     {
-        _ecore_con_log_dom = eina_log_domain_register
-          ("ecore_con", ECORE_CON_DEFAULT_LOG_COLOR);
-        if (_ecore_con_log_dom < 0)
-          goto ecore_con_log_error;
-     }
+     goto ecore_con_log_error;
 
    _efl_net_proxy_helper_init();
 
@@ -155,9 +152,8 @@ ecore_con_shutdown(void)
 
    ecore_con_legacy_shutdown();
 
-   /* do not unregister log domain as ecore_con_servers may be pending deletion
-    * due Ecore_Event.
-    */
+   eina_log_domain_unregister(_ecore_con_log_dom);
+   _ecore_con_log_dom = -1;
 
    ecore_shutdown();
 #ifdef _WIN32