summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-01-15 19:23:44 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-01-15 19:23:44 +0000
commitee6cc91a03ae264f700bedfbf5c1d20532abc3a1 (patch)
tree4f9f0c4ba76975dcceb7efcbf678693df366c4ca /src/bin
parenteb72593bbca59541dacf706ceb6d6f0fa29756f4 (diff)
eina - fix eina_strndup test passing
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/efreet/efreetd_ipc.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/bin/efreet/efreetd_ipc.c b/src/bin/efreet/efreetd_ipc.c
index 933abfc..0992345 100644
--- a/src/bin/efreet/efreetd_ipc.c
+++ b/src/bin/efreet/efreetd_ipc.c
@@ -18,6 +18,7 @@ static Ecore_Event_Handler *hnd_add = NULL;
18static Ecore_Event_Handler *hnd_del = NULL; 18static Ecore_Event_Handler *hnd_del = NULL;
19static Ecore_Event_Handler *hnd_data = NULL; 19static Ecore_Event_Handler *hnd_data = NULL;
20static int clients = 0; 20static int clients = 0;
21static Ecore_Timer *quit_timer_start = NULL;
21static Ecore_Timer *quit_timer = NULL; 22static Ecore_Timer *quit_timer = NULL;
22 23
23static Eina_Bool 24static Eina_Bool
@@ -28,6 +29,15 @@ _cb_quit_timer(void *data EINA_UNUSED)
28 return EINA_FALSE; 29 return EINA_FALSE;
29} 30}
30 31
32static Eina_Bool
33_cb_quit_timer_start(void *data EINA_UNUSED)
34{
35 quit_timer_start = NULL;
36 if (quit_timer) ecore_timer_del(quit_timer);
37 quit_timer = ecore_timer_add(10.0, _cb_quit_timer, NULL);
38 return EINA_FALSE;
39}
40
31static void 41static void
32_broadcast(Ecore_Ipc_Server *svr, int major, int minor, void *data, int size) 42_broadcast(Ecore_Ipc_Server *svr, int major, int minor, void *data, int size)
33{ 43{
@@ -101,6 +111,11 @@ _cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
101 ecore_timer_del(quit_timer); 111 ecore_timer_del(quit_timer);
102 quit_timer = NULL; 112 quit_timer = NULL;
103 } 113 }
114 if (quit_timer_start)
115 {
116 ecore_timer_del(quit_timer_start);
117 quit_timer_start = NULL;
118 }
104 clients++; 119 clients++;
105 return ECORE_CALLBACK_DONE; 120 return ECORE_CALLBACK_DONE;
106} 121}
@@ -211,7 +226,7 @@ ipc_init(void)
211 ecore_ipc_shutdown(); 226 ecore_ipc_shutdown();
212 return EINA_FALSE; 227 return EINA_FALSE;
213 } 228 }
214 quit_timer = ecore_timer_add(2.0, _cb_quit_timer, NULL); 229 quit_timer_start = ecore_timer_add(10.0, _cb_quit_timer_start, NULL);
215 hnd_add = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_ADD, 230 hnd_add = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_ADD,
216 _cb_client_add, NULL); 231 _cb_client_add, NULL);
217 hnd_del = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DEL, 232 hnd_del = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DEL,
@@ -228,6 +243,10 @@ ipc_shutdown(void)
228 if (init <= 0) return EINA_TRUE; 243 if (init <= 0) return EINA_TRUE;
229 init--; 244 init--;
230 if (init > 0) return EINA_TRUE; 245 if (init > 0) return EINA_TRUE;
246 if (quit_timer) ecore_timer_del(quit_timer);
247 if (quit_timer_start) ecore_timer_del(quit_timer_start);
248 quit_timer = NULL;
249 quit_timer_start = NULL;
231 ecore_ipc_server_del(ipc); 250 ecore_ipc_server_del(ipc);
232 ecore_event_handler_del(hnd_add); 251 ecore_event_handler_del(hnd_add);
233 ecore_event_handler_del(hnd_del); 252 ecore_event_handler_del(hnd_del);