summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Kroitor <an.kroitor@samsung.com>2016-08-31 10:12:10 +0300
committerAndrii Kroitor <an.kroitor@samsung.com>2016-08-31 19:41:45 +0300
commit61f63e7db4edd50d08c2621e70128c3ab21ed1f7 (patch)
tree06ddadda4ee8ccbc0c3adb80a6cded7a1a83b626
parent80f7ddb808ed3f530d877707de067622a7ef4b27 (diff)
clear named objects list when preload is disconnected
-rw-r--r--src/server.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/server.c b/src/server.c
index 41ae83a..de2bd21 100644
--- a/src/server.c
+++ b/src/server.c
@@ -6,11 +6,19 @@
6 6
7static int _client_count = 0; 7static int _client_count = 0;
8static Ecore_Con_Reply *reply_to_lib, *reply_to_preload, *reply_to_rec; 8static Ecore_Con_Reply *reply_to_lib, *reply_to_preload, *reply_to_rec;
9static Eina_List *named_objects = NULL;
10
11static int
12_named_object_cmp(const void *o1, const void* o2)
13{
14 return strcmp(((EAuto_Named_Object *)o1)->new_name, ((EAuto_Named_Object *)o2)->new_name);
15}
9 16
10static Eina_Bool 17static Eina_Bool
11_eet_client_discnct_cb(void *data EINA_UNUSED, Ecore_Con_Reply *reply EINA_UNUSED, Ecore_Con_Client *conn EINA_UNUSED) 18_eet_client_discnct_cb(void *data EINA_UNUSED, Ecore_Con_Reply *reply EINA_UNUSED, Ecore_Con_Client *conn EINA_UNUSED)
12{ 19{
13 EAuto_Close ev; 20 EAuto_Close ev;
21 EAuto_Named_Object *no;
14 if (reply == reply_to_preload) 22 if (reply == reply_to_preload)
15 { 23 {
16 reply_to_preload = NULL; 24 reply_to_preload = NULL;
@@ -21,6 +29,8 @@ _eet_client_discnct_cb(void *data EINA_UNUSED, Ecore_Con_Reply *reply EINA_UNUSE
21 ecore_con_eet_send(reply_to_rec, EAUTO_CLOSE_STREAM, &ev); 29 ecore_con_eet_send(reply_to_rec, EAUTO_CLOSE_STREAM, &ev);
22 ecore_con_server_flush(ecore_con_eet_reply(reply_to_rec)); 30 ecore_con_server_flush(ecore_con_eet_reply(reply_to_rec));
23 } 31 }
32 EINA_LIST_FREE(named_objects, no)
33 free(no);
24 } 34 }
25 else if (reply == reply_to_rec) 35 else if (reply == reply_to_rec)
26 reply_to_rec = NULL; 36 reply_to_rec = NULL;
@@ -57,14 +67,6 @@ _eet_data_cb(void *data EINA_UNUSED, Ecore_Con_Reply *reply, const char *protoco
57 } 67 }
58} 68}
59 69
60static Eina_List *named_objects = NULL;
61
62static int
63_named_object_cmp(const void *o1, const void* o2)
64{
65 return strcmp(((EAuto_Named_Object *)o1)->new_name, ((EAuto_Named_Object *)o2)->new_name);
66}
67
68static void 70static void
69_named_object_cb(void *data EINA_UNUSED, Ecore_Con_Reply *reply EINA_UNUSED, const char *protocol_name EINA_UNUSED, void *value) 71_named_object_cb(void *data EINA_UNUSED, Ecore_Con_Reply *reply EINA_UNUSED, const char *protocol_name EINA_UNUSED, void *value)
70{ 72{