summaryrefslogtreecommitdiff
path: root/src/lib/ecore_ipc
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-12-19 11:37:24 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-12-19 13:03:33 -0200
commit482437ee14885a21a94ee0d110474253ae3202ab (patch)
tree3145756f8a3d660b7d811aa0b58507d043a030bf /src/lib/ecore_ipc
parentd0a626351946cc7eee7c0c9da1d142e763097153 (diff)
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.
Diffstat (limited to 'src/lib/ecore_ipc')
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 17f77441dc..dfacf933bc 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -323,13 +323,18 @@ ecore_ipc_init(void)
323 323
324 if (++_ecore_ipc_init_count != 1) 324 if (++_ecore_ipc_init_count != 1)
325 return _ecore_ipc_init_count; 325 return _ecore_ipc_init_count;
326 _ecore_ipc_log_dom = eina_log_domain_register 326
327 ("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR); 327 if (_ecore_ipc_log_dom < 0)
328 if(_ecore_ipc_log_dom < 0)
329 { 328 {
330 EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module."); 329 _ecore_ipc_log_dom = eina_log_domain_register
331 return --_ecore_ipc_init_count; 330 ("ecore_ipc", ECORE_IPC_DEFAULT_LOG_COLOR);
331 if(_ecore_ipc_log_dom < 0)
332 {
333 EINA_LOG_ERR("Impossible to create a log domain for the Ecore IPC module.");
334 return --_ecore_ipc_init_count;
335 }
332 } 336 }
337
333 if (!ecore_con_init()) 338 if (!ecore_con_init())
334 return --_ecore_ipc_init_count; 339 return --_ecore_ipc_init_count;
335 340
@@ -378,8 +383,11 @@ ecore_ipc_shutdown(void)
378#endif 383#endif
379 384
380 ecore_con_shutdown(); 385 ecore_con_shutdown();
381 eina_log_domain_unregister(_ecore_ipc_log_dom); 386
382 _ecore_ipc_log_dom = -1; 387 /* do not unregister log domain as ecore_ipc_servers may be pending deletion
388 * due Ecore_Event.
389 */
390
383 return _ecore_ipc_init_count; 391 return _ecore_ipc_init_count;
384} 392}
385 393