summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:10:00 -0800
committerCedric BAIL <cedric@osg.samsung.com>2017-03-09 16:17:58 -0800
commitdeb6f0d2cd33b14932a9b7dd05e4b6ddea5a3318 (patch)
tree2a948a08cc6aff5f0cf77eed4be4f87fdd34dc42 /src/lib/ecore_con
parentb80cfb38a1e5a8d4c223458e6c24fd48a205829f (diff)
ecore_con: avoid potential crash during shutdown due to Ecore_Event queue.
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c14
-rw-r--r--src/lib/ecore_con/ecore_con_url.c5
2 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index bfff6d939c..47c436b5f4 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -218,6 +218,20 @@ ecore_con_legacy_shutdown(void)
218 EINA_LIST_FREE(_ecore_con_lookups, lookup_ctx) 218 EINA_LIST_FREE(_ecore_con_lookups, lookup_ctx)
219 ecore_thread_cancel(lookup_ctx->thread); 219 ecore_thread_cancel(lookup_ctx->thread);
220 220
221 ecore_event_type_flush(ECORE_CON_EVENT_CLIENT_ADD,
222 ECORE_CON_EVENT_CLIENT_DEL,
223 ECORE_CON_EVENT_SERVER_ADD,
224 ECORE_CON_EVENT_SERVER_DEL,
225 ECORE_CON_EVENT_CLIENT_DATA,
226 ECORE_CON_EVENT_SERVER_DATA,
227 ECORE_CON_EVENT_CLIENT_WRITE,
228 ECORE_CON_EVENT_SERVER_WRITE,
229 ECORE_CON_EVENT_CLIENT_ERROR,
230 ECORE_CON_EVENT_SERVER_ERROR,
231 ECORE_CON_EVENT_PROXY_BIND,
232 ECORE_CON_EVENT_SERVER_UPGRADE,
233 ECORE_CON_EVENT_CLIENT_UPGRADE);
234
221 ecore_con_socks_shutdown(); 235 ecore_con_socks_shutdown();
222 if (!_ecore_con_event_count) ecore_con_mempool_shutdown(); 236 if (!_ecore_con_event_count) ecore_con_mempool_shutdown();
223 else WRN("%d events still exist, leaking ecore_con mempools", _ecore_con_event_count); 237 else WRN("%d events still exist, leaking ecore_con mempools", _ecore_con_event_count);
diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c
index 557e2c85fb..8c03176738 100644
--- a/src/lib/ecore_con/ecore_con_url.c
+++ b/src/lib/ecore_con/ecore_con_url.c
@@ -73,6 +73,11 @@ ecore_con_url_shutdown(void)
73 if (_init_count) return _init_count; 73 if (_init_count) return _init_count;
74 EINA_LIST_FREE(_url_con_url_list, url_con_url) 74 EINA_LIST_FREE(_url_con_url_list, url_con_url)
75 ecore_con_url_free(url_con_url); 75 ecore_con_url_free(url_con_url);
76
77 ecore_event_type_flush(ECORE_CON_EVENT_URL_DATA,
78 ECORE_CON_EVENT_URL_COMPLETE,
79 ECORE_CON_EVENT_URL_PROGRESS);
80
76 _c_shutdown(); 81 _c_shutdown();
77 emile_shutdown(); /* no emile_cipher_shutdown(), handled here */ 82 emile_shutdown(); /* no emile_cipher_shutdown(), handled here */
78 ecore_con_shutdown(); 83 ecore_con_shutdown();