e = ev;
if (e->client)
{
+ Eina_Bool svrfreed = EINA_FALSE;
+
e->client->event_count = eina_list_remove(e->client->event_count, e);
if (e->client->host_server)
{
e->client->host_server->event_count = eina_list_remove(e->client->host_server->event_count, ev);
if ((!svr->event_count) && (svr->delete_me))
- _ecore_con_server_free(svr);
+ {
+ _ecore_con_server_free(svr);
+ svrfreed = EINA_TRUE;
+ }
+ }
+ if (!svrfreed)
+ {
+ if ((!e->client->event_count) && (e->client->delete_me))
+ ecore_con_client_del(e->client);
}
- if ((!e->client->event_count) && (e->client->delete_me))
- ecore_con_client_del(e->client);
}
ecore_con_event_client_add_free(e);
e = ev;
if (e->client)
{
+ Eina_Bool svrfreed = EINA_FALSE;
+
e->client->event_count = eina_list_remove(e->client->event_count, e);
if (e->client->host_server)
{
e->client->host_server->event_count = eina_list_remove(e->client->host_server->event_count, ev);
if ((!svr->event_count) && (svr->delete_me))
- _ecore_con_server_free(svr);
+ {
+ _ecore_con_server_free(svr);
+ svrfreed = EINA_TRUE;
+ }
+ }
+ if (!svrfreed)
+ {
+ if (!e->client->event_count)
+ _ecore_con_client_free(e->client);
}
- if (!e->client->event_count)
- _ecore_con_client_free(e->client);
}
ecore_con_event_client_del_free(e);
_ecore_con_event_count--;
{
if (e->client)
{
+ Eina_Bool svrfreed = EINA_FALSE;
+
e->client->event_count = eina_list_remove(e->client->event_count, e);
if (e->client->host_server)
{
e->client->host_server->event_count = eina_list_remove(e->client->host_server->event_count, e);
if ((!svr->event_count) && (svr->delete_me))
- _ecore_con_server_free(svr);
+ {
+ _ecore_con_server_free(svr);
+ svrfreed = EINA_TRUE;
+ }
+ }
+ if (!svrfreed)
+ {
+ if (((!e->client->event_count) && (e->client->delete_me)) ||
+ ((e->client->host_server &&
+ ((e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_UDP ||
+ (e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_MCAST))))
+ ecore_con_client_del(e->client);
}
- if (((!e->client->event_count) && (e->client->delete_me)) ||
- ((e->client->host_server &&
- ((e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_UDP ||
- (e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_MCAST))))
- ecore_con_client_del(e->client);
}
ecore_con_event_client_write_free(e);
_ecore_con_event_count--;
e = ev;
if (e->client)
{
+ Eina_Bool svrfreed = EINA_FALSE;
+
e->client->event_count = eina_list_remove(e->client->event_count, e);
if (e->client->host_server)
{
e->client->host_server->event_count = eina_list_remove(e->client->host_server->event_count, ev);
}
if ((!svr->event_count) && (svr->delete_me))
- _ecore_con_server_free(svr);
- if (((!e->client->event_count) && (e->client->delete_me)) ||
- ((e->client->host_server &&
- ((e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_UDP ||
- (e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_MCAST))))
- ecore_con_client_del(e->client);
+ {
+ _ecore_con_server_free(svr);
+ svrfreed = EINA_TRUE;
+ }
+ if (!svrfreed)
+ {
+ if (((!e->client->event_count) && (e->client->delete_me)) ||
+ ((e->client->host_server &&
+ ((e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_UDP ||
+ (e->client->host_server->type & ECORE_CON_TYPE) == ECORE_CON_REMOTE_MCAST))))
+ ecore_con_client_del(e->client);
+ }
}
free(e->data);
ecore_con_event_client_data_free(e);
{
if (e->client)
{
+ Eina_Bool svrfreed = EINA_FALSE;
+
if (eina_list_data_find(svr->clients, e->client))
{
e->client->event_count = eina_list_remove(e->client->event_count, e);
if ((!e->client->event_count) && (e->client->delete_me))
- _ecore_con_client_free(e->client);
+ {
+ _ecore_con_client_free(e->client);
+ svrfreed = EINA_TRUE;
+ }
}
svr->event_count = eina_list_remove(svr->event_count, e);
- if ((!svr->event_count) && (svr->delete_me))
- _ecore_con_server_free(svr);
+ if (!svrfreed)
+ {
+ if ((!svr->event_count) && (svr->delete_me))
+ _ecore_con_server_free(svr);
+ }
}
free(e->error);
ecore_con_event_client_error_free(e);