forked from enlightenment/efl
ecore_con/ecore_ipc: keep log domain alive after shutdown.
These legacy API had the nasty behavior of keeping handles alive until the pending events were dispatched, this could happen after the module itself was shutdown, resulting in log to unregistered domains. Then do not unregister the domain -- eina_shutdown will avoid leaks anyway.
This commit is contained in:
parent
d0a6263519
commit
482437ee14
|
@ -92,10 +92,13 @@ 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)
|
||||
goto ecore_con_log_error;
|
||||
{
|
||||
_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;
|
||||
}
|
||||
|
||||
ecore_con_mempool_init();
|
||||
ecore_con_legacy_init();
|
||||
|
@ -159,8 +162,10 @@ ecore_con_shutdown(void)
|
|||
|
||||
ecore_con_legacy_shutdown();
|
||||
|
||||
eina_log_domain_unregister(_ecore_con_log_dom);
|
||||
_ecore_con_log_dom = -1;
|
||||
/* do not unregister log domain as ecore_con_servers may be pending deletion
|
||||
* due Ecore_Event.
|
||||
*/
|
||||
|
||||
ecore_shutdown();
|
||||
#ifdef HAVE_EVIL
|
||||
evil_shutdown();
|
||||
|
|
|
@ -323,13 +323,18 @@ ecore_ipc_init(void)
|
|||
|
||||
if (++_ecore_ipc_init_count != 1)
|
||||
return _ecore_ipc_init_count;
|
||||
_ecore_ipc_log_dom = eina_log_domain_register
|
||||
("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR);
|
||||
if(_ecore_ipc_log_dom < 0)
|
||||
|
||||
if (_ecore_ipc_log_dom < 0)
|
||||
{
|
||||
EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module.");
|
||||
return --_ecore_ipc_init_count;
|
||||
_ecore_ipc_log_dom = eina_log_domain_register
|
||||
("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR);
|
||||
if(_ecore_ipc_log_dom < 0)
|
||||
{
|
||||
EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module.");
|
||||
return --_ecore_ipc_init_count;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ecore_con_init())
|
||||
return --_ecore_ipc_init_count;
|
||||
|
||||
|
@ -378,8 +383,11 @@ ecore_ipc_shutdown(void)
|
|||
#endif
|
||||
|
||||
ecore_con_shutdown();
|
||||
eina_log_domain_unregister(_ecore_ipc_log_dom);
|
||||
_ecore_ipc_log_dom = -1;
|
||||
|
||||
/* do not unregister log domain as ecore_ipc_servers may be pending deletion
|
||||
* due Ecore_Event.
|
||||
*/
|
||||
|
||||
return _ecore_ipc_init_count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue