summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-18 12:25:59 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-18 19:54:31 +0900
commitfce444bb188d1873d9fb4482811058418588cd6b (patch)
tree6dd644e587d22c4e64a56c05d27f9715107b46ed /src/lib
parentc0c5e72408f43206bdf428431e2a24446f8b9875 (diff)
ecore_con: Make sure the proxy helper is valid
If the http proxy helper gets deleted at shutdown rather than because the process actually exited, the object pointer becomes invalid. This patch tries to avoid a situation where the object is not valid.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_con/ecore_con_proxy_helper.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/ecore_con/ecore_con_proxy_helper.c b/src/lib/ecore_con/ecore_con_proxy_helper.c
index c313b4d4f7..f99c7a225b 100644
--- a/src/lib/ecore_con/ecore_con_proxy_helper.c
+++ b/src/lib/ecore_con/ecore_con_proxy_helper.c
@@ -53,6 +53,16 @@ static int locks = 0;
53#endif 53#endif
54 54
55static void 55static void
56_efl_net_proxy_helper_delete_cb(void *data EINA_UNUSED, const Efl_Event *ev)
57{
58 if (ev->object == _efl_net_proxy_helper_exe)
59 {
60 INF("HTTP proxy helper object died before the process exited.");
61 _efl_net_proxy_helper_exe = NULL;
62 }
63}
64
65static void
56_efl_net_proxy_helper_spawn(void) 66_efl_net_proxy_helper_spawn(void)
57{ 67{
58 char buf[PATH_MAX]; 68 char buf[PATH_MAX];
@@ -102,6 +112,8 @@ _efl_net_proxy_helper_spawn(void)
102 locks--; 112 locks--;
103 } 113 }
104 eina_spinlock_release(&_efl_net_proxy_helper_queue_lock); 114 eina_spinlock_release(&_efl_net_proxy_helper_queue_lock);
115 efl_event_callback_add(_efl_net_proxy_helper_exe, EFL_EVENT_DEL,
116 _efl_net_proxy_helper_delete_cb, NULL);
105} 117}
106 118
107static void 119static void