>From c83bcffc5ac24154cbbf98df953b3b9121f4797b Mon Sep 17 00:00:00 2001 From: Mike McCormack <mj.mccorm...@samsung.com> Date: Mon, 13 Dec 2010 16:23:39 +0900 Subject: [PATCH 1/4] Always close fd after remove fdh from main loop
--- trunk/ecore/src/lib/ecore_con/ecore_con.c | 31 +++++++++++++++------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/trunk/ecore/src/lib/ecore_con/ecore_con.c b/trunk/ecore/src/lib/ecore_con/ecore_con.c index 9e8b50c..49f1fae 100644 --- a/trunk/ecore/src/lib/ecore_con/ecore_con.c +++ b/trunk/ecore/src/lib/ecore_con/ecore_con.c @@ -373,12 +373,12 @@ error: free(svr->path); #ifndef _WIN32 - if (svr->fd >= 0) - close(svr->fd); - if (svr->fd_handler) ecore_main_fd_handler_del(svr->fd_handler); + if (svr->fd >= 0) + close(svr->fd); + if (svr->write_buf) free(svr->write_buf); @@ -494,12 +494,12 @@ error: if (svr->path) free(svr->path); - if (svr->fd >= 0) - close(svr->fd); - if (svr->fd_handler) ecore_main_fd_handler_del(svr->fd_handler); + if (svr->fd >= 0) + close(svr->fd); + ecore_con_ssl_server_shutdown(svr); free(svr); return NULL; @@ -1184,9 +1184,6 @@ _ecore_con_server_free(Ecore_Con_Server *svr) unlink(svr->path); ecore_con_ssl_server_shutdown(svr); - if (svr->fd >= 0) - close(svr->fd); - if (svr->name) free(svr->name); @@ -1199,6 +1196,9 @@ _ecore_con_server_free(Ecore_Con_Server *svr) if (svr->fd_handler) ecore_main_fd_handler_del(svr->fd_handler); + if (svr->fd >= 0) + close(svr->fd); + servers = eina_list_remove(servers, svr); svr->data = NULL; free(svr); @@ -1253,12 +1253,12 @@ _ecore_con_client_free(Ecore_Con_Client *cl) if (cl->host_server->type & ECORE_CON_SSL) ecore_con_ssl_client_shutdown(cl); - if (cl->fd >= 0) - close(cl->fd); - if (cl->fd_handler) ecore_main_fd_handler_del(cl->fd_handler); + if (cl->fd >= 0) + close(cl->fd); + if (cl->client_addr) free(cl->client_addr); cl->client_addr = NULL; @@ -1771,9 +1771,12 @@ _ecore_con_svr_tcp_handler(void *data, return ECORE_CALLBACK_RENEW; error: - close(new_fd); if (cl && cl->fd_handler) - ecore_main_fd_handler_del(cl->fd_handler); + { + ecore_main_fd_handler_del(cl->fd_handler); + close(cl->fd); + free(cl); + } return ECORE_CALLBACK_RENEW; } -- 1.7.0.4
------------------------------------------------------------------------------ Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL, new data types, scalar functions, improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, best practices and more. http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel