summaryrefslogtreecommitdiff
path: root/src/lib/ecore_ipc
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-09 20:16:07 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-06-09 19:14:59 -0400
commitf2edb935a41765243fe72ed6570e96e7d87852d7 (patch)
tree6aff3c0c0a0fa34acee59124add5ad98cac622d2 /src/lib/ecore_ipc
parenta777fcb679833727fedbbbdc96826f947bb10ed9 (diff)
ecore-ipc: don't return dead clients in ecore_ipc_server_clients_get
@fix fix T5383
Diffstat (limited to 'src/lib/ecore_ipc')
-rw-r--r--src/lib/ecore_ipc/ecore_ipc.c7
-rw-r--r--src/lib/ecore_ipc/ecore_ipc_private.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ecore_ipc/ecore_ipc.c b/src/lib/ecore_ipc/ecore_ipc.c
index 0c08bfcd5f..e9973f30a7 100644
--- a/src/lib/ecore_ipc/ecore_ipc.c
+++ b/src/lib/ecore_ipc/ecore_ipc.c
@@ -809,6 +809,8 @@ ecore_ipc_server_del(Ecore_Ipc_Server *svr)
809 servers = eina_list_remove(servers, svr); 809 servers = eina_list_remove(servers, svr);
810 810
811 if (svr->buf) free(svr->buf); 811 if (svr->buf) free(svr->buf);
812 eina_list_free(svr->dead_clients);
813 eina_list_free(svr->clients);
812 ECORE_MAGIC_SET(svr, ECORE_MAGIC_NONE); 814 ECORE_MAGIC_SET(svr, ECORE_MAGIC_NONE);
813 DBG("server %p freed", svr); 815 DBG("server %p freed", svr);
814 free(svr); 816 free(svr);
@@ -1233,6 +1235,9 @@ _ecore_ipc_client_socket_del(Ecore_Ipc_Client *cl)
1233 efl_io_closer_close(cl->socket.socket); 1235 efl_io_closer_close(cl->socket.socket);
1234 efl_unref(cl->socket.socket); 1236 efl_unref(cl->socket.socket);
1235 cl->socket.socket = NULL; 1237 cl->socket.socket = NULL;
1238 if (!cl->svr) return;
1239 cl->svr->clients = eina_list_remove(cl->svr->clients, cl);
1240 cl->svr->dead_clients = eina_list_append(cl->svr->dead_clients, cl);
1236 } 1241 }
1237} 1242}
1238 1243
@@ -1355,7 +1360,7 @@ ecore_ipc_client_del(Ecore_Ipc_Client *cl)
1355 svr = cl->svr; 1360 svr = cl->svr;
1356 if (cl->socket.socket) _ecore_ipc_client_socket_del(cl); 1361 if (cl->socket.socket) _ecore_ipc_client_socket_del(cl);
1357 if (ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER)) 1362 if (ECORE_MAGIC_CHECK(svr, ECORE_MAGIC_IPC_SERVER))
1358 svr->clients = eina_list_remove(svr->clients, cl); 1363 svr->dead_clients = eina_list_remove(svr->dead_clients, cl);
1359 if (cl->buf) free(cl->buf); 1364 if (cl->buf) free(cl->buf);
1360 ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE); 1365 ECORE_MAGIC_SET(cl, ECORE_MAGIC_NONE);
1361 free(cl); 1366 free(cl);
diff --git a/src/lib/ecore_ipc/ecore_ipc_private.h b/src/lib/ecore_ipc/ecore_ipc_private.h
index 9978b16143..72ec014e7c 100644
--- a/src/lib/ecore_ipc/ecore_ipc_private.h
+++ b/src/lib/ecore_ipc/ecore_ipc_private.h
@@ -103,6 +103,7 @@ struct _Ecore_Ipc_Server
103 Eo *server; 103 Eo *server;
104 104
105 Eina_List *clients; 105 Eina_List *clients;
106 Eina_List *dead_clients;
106 void *data; 107 void *data;
107 unsigned char *buf; 108 unsigned char *buf;
108 int buf_size; 109 int buf_size;