ecore_events are asynchronous and can be dispatched after the server
is deleted (ecore_con_server_del()). In this case, server will flag
"delete_me" and avoid doing double-free. When the event is dispatched
and the server is deleted, we still need to free resources and so we
need to call _ecore_con_server_free(). But we cannot do that by means
of ecore_con_server_del() since it will check "delete_me" flag and
will return.
This patch calls _ecore_con_server_free() directly when events are
dispatched and server is deleted. It fixes problems with
forecasts/weather modules exhausting file descriptors, a long standing
issue that bring problems with pam/desklock authentication.
Thanks to manio to point out #305 and testing.
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@40490
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
e = ev;
e->server->event_count--;
if ((e->server->event_count == 0) && (e->server->delete_me))
- ecore_con_server_del(e->server);
+ _ecore_con_server_free(e->server);
free(e);
}
e = ev;
e->server->event_count--;
if ((e->server->event_count == 0) && (e->server->delete_me))
- ecore_con_server_del(e->server);
+ _ecore_con_server_free(e->server);
free(e);
}
e->server->event_count--;
if (e->data) free(e->data);
if ((e->server->event_count == 0) && (e->server->delete_me))
- ecore_con_server_del(e->server);
+ _ecore_con_server_free(e->server);
free(e);
}