ecore_ipc: Unregister log domain on shutdown

An old comment mentioned that this was explicitely not unregistered, but
I believe the comment isn't valid since ecore_event_type_flush() was
introduced.
This commit is contained in:
Jean-Philippe Andre 2017-09-26 16:32:29 +09:00
parent 5cea60d157
commit f839905184
1 changed files with 12 additions and 12 deletions

View File

@ -309,19 +309,20 @@ ecore_ipc_init(void)
if (++_ecore_ipc_init_count != 1) if (++_ecore_ipc_init_count != 1)
return _ecore_ipc_init_count; return _ecore_ipc_init_count;
if (_ecore_ipc_log_dom < 0) _ecore_ipc_log_dom = eina_log_domain_register
("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR);
if(_ecore_ipc_log_dom < 0)
{ {
_ecore_ipc_log_dom = eina_log_domain_register EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module.");
("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR); return --_ecore_ipc_init_count;
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()) if (!ecore_con_init())
return --_ecore_ipc_init_count; {
eina_log_domain_unregister(_ecore_ipc_log_dom);
_ecore_ipc_log_dom = -1;
return --_ecore_ipc_init_count;
}
ECORE_IPC_EVENT_CLIENT_ADD = ecore_event_type_new(); ECORE_IPC_EVENT_CLIENT_ADD = ecore_event_type_new();
ECORE_IPC_EVENT_CLIENT_DEL = ecore_event_type_new(); ECORE_IPC_EVENT_CLIENT_DEL = ecore_event_type_new();
@ -353,9 +354,8 @@ ecore_ipc_shutdown(void)
ecore_con_shutdown(); ecore_con_shutdown();
/* do not unregister log domain as ecore_ipc_servers may be pending deletion eina_log_domain_unregister(_ecore_ipc_log_dom);
* due Ecore_Event. _ecore_ipc_log_dom = -1;
*/
return _ecore_ipc_init_count; return _ecore_ipc_init_count;
} }