ecore con: Fix UDP sockets.

The client structure holds a file descriptor, which is not initialized (which means 0) in case of UDP as there is no client-specific socket.

 However, we check for the file descriptor being positive before closing it in the client destructor, which means that we actually end up closing the 0 file descriptor.

 That means that things were going crazy with real strange things happening afterwards…
This commit is contained in:
Chidambar Zinnoury 2015-11-20 17:46:38 +01:00
parent 58a1b2767e
commit 4983ac6d36
1 changed files with 1 additions and 0 deletions

View File

@ -2360,6 +2360,7 @@ _ecore_con_svr_udp_handler(void *data,
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, ECORE_CALLBACK_RENEW);
cl->host_server = svr_obj;
cl->fd = -1;
cl->client_addr = malloc(client_addr_len);
if (!cl->client_addr)
{