summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-11-11 20:34:35 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2010-11-11 20:34:35 +0000
commitcc016988721144b63eddbfa00a495dbf50778ee5 (patch)
tree735eea9f9a5cc81f3dd1f308d2da5b0cb57cd94e /legacy
parent3552a91b7d7d22934e4cf9ccd3fbfd203ab6582b (diff)
avoid looping infinitely while freeing servers, and don't log while freeing servers in case ecore_con's log domain has already been unregistered
SVN revision: 54479
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/src/lib/ecore_con/ecore_con.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/legacy/ecore/src/lib/ecore_con/ecore_con.c b/legacy/ecore/src/lib/ecore_con/ecore_con.c
index 771b4be985..5692eed80e 100644
--- a/legacy/ecore/src/lib/ecore_con/ecore_con.c
+++ b/legacy/ecore/src/lib/ecore_con/ecore_con.c
@@ -165,11 +165,14 @@ ecore_con_init(void)
165EAPI int 165EAPI int
166ecore_con_shutdown(void) 166ecore_con_shutdown(void)
167{ 167{
168 Eina_List *l, *l2;
169 Ecore_Con_Server *svr;
170
168 if (--_ecore_con_init_count != 0) 171 if (--_ecore_con_init_count != 0)
169 return _ecore_con_init_count; 172 return _ecore_con_init_count;
170 173
171 while (servers) 174 EINA_LIST_FOREACH_SAFE(servers, l, l2, svr)
172 _ecore_con_server_free(eina_list_data_get(servers)); 175 _ecore_con_server_free(svr);
173 176
174 ecore_con_info_shutdown(); 177 ecore_con_info_shutdown();
175 ecore_con_ssl_shutdown(); 178 ecore_con_ssl_shutdown();
@@ -1143,7 +1146,6 @@ _ecore_con_server_free(Ecore_Con_Server *svr)
1143 Ecore_Con_Event_Server_Del *e; 1146 Ecore_Con_Event_Server_Del *e;
1144 1147
1145 svr->dead = EINA_TRUE; 1148 svr->dead = EINA_TRUE;
1146 INF("Lost server %s", svr->ip);
1147 e = calloc(1, sizeof(Ecore_Con_Event_Server_Del)); 1149 e = calloc(1, sizeof(Ecore_Con_Event_Server_Del));
1148 EINA_SAFETY_ON_NULL_RETURN(e); 1150 EINA_SAFETY_ON_NULL_RETURN(e);
1149 1151
@@ -1214,7 +1216,6 @@ _ecore_con_client_free(Ecore_Con_Client *cl)
1214 Ecore_Con_Event_Client_Del *e; 1216 Ecore_Con_Event_Client_Del *e;
1215 1217
1216 cl->dead = EINA_TRUE; 1218 cl->dead = EINA_TRUE;
1217 INF("Lost client %s", cl->ip);
1218 e = calloc(1, sizeof(Ecore_Con_Event_Client_Del)); 1219 e = calloc(1, sizeof(Ecore_Con_Event_Client_Del));
1219 EINA_SAFETY_ON_NULL_RETURN(e); 1220 EINA_SAFETY_ON_NULL_RETURN(e);
1220 1221