summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2020-04-12 18:21:36 +0100
committerAlastair Poole <netstar@gmail.com>2020-04-12 18:21:36 +0100
commit39b87b68f1e802872973a4fa43ec0068fe835c67 (patch)
tree297fabab6ce7c4421445bb51ae391c3e624ac7d7
parent29552d71c98dccd6a9e77f5ebc723ed5235c75ff (diff)
edi_exe: delete server object correct path.
The server wasn't deleted at the correct location. By fixing this we ensure all object references are removed and destructor code called which cleans up (including removing the socket etc). Linux was much more lenient, though the BSD-specific lock code brought this to light. Now this works properly.
-rw-r--r--src/lib/edi_exe.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/lib/edi_exe.c b/src/lib/edi_exe.c
index c080838..2fa4e87 100644
--- a/src/lib/edi_exe.c
+++ b/src/lib/edi_exe.c
@@ -23,6 +23,7 @@ _edi_exe_notify_client_data_cb(void *data, int type EINA_UNUSED, void *event EIN
{
int *status;
Edi_Exe_Args *args;
+ Ecore_Con_Server *srv;
Ecore_Con_Event_Client_Data *ev = event;
status = ev->data;
@@ -36,6 +37,9 @@ _edi_exe_notify_client_data_cb(void *data, int type EINA_UNUSED, void *event EIN
free(args);
+ srv = ecore_con_client_server_get(ev->client);
+ ecore_con_server_del(srv);
+
return ECORE_CALLBACK_DONE;
}
@@ -61,25 +65,9 @@ static Eina_Bool
_edi_exe_notify_server_data_cb(void *data, int type EINA_UNUSED, void *event EINA_UNUSED)
{
Edi_Exe_Args *args;
- char *path;
- Ecore_Con_Event_Server_Data *ev = event;
-
- path = ecore_con_local_path_new(ECORE_CON_LOCAL_USER, ecore_con_server_name_get(ev->server), 0);
args = data;
-
ecore_event_handler_del(args->handler);
- ecore_con_server_del(ev->server);
-
- // FIXME: workaround.
- if (path)
- {
- if (ecore_file_exists(path))
- unlink(path);
-
- free(path);
- }
-
free(args);
return ECORE_CALLBACK_DONE;