dbus: do not segv atexit under py3

This is a workaround as I cannot find a better way to fix this :(

The real issue is that dbus run some callback in our code after
our shutdown of ecore and eina
This commit is contained in:
Davide Andreoli 2016-08-08 17:20:16 +02:00
parent 02f7eb07dd
commit 5a3c19b521
1 changed files with 12 additions and 1 deletions

View File

@ -72,6 +72,9 @@ cb_dispatch_status(DBusConnection *conn, DBusDispatchStatus new_status, void *da
{
E_DBus_Connection *cd = data;
if (_edbus_init_count <= 0)
return;
DBG("dispatch status: %d!", new_status);
if (new_status == DBUS_DISPATCH_DATA_REMAINS && !cd->idler)
@ -190,6 +193,9 @@ cb_watch_del(DBusWatch *watch, void *data)
{
E_DBus_Handler_Data *hd;
if (_edbus_init_count <= 0)
return;
DDBG("Watch del on fd: %d (flags: %d)", dbus_watch_get_unix_fd(watch),
dbus_watch_get_flags(watch));
@ -210,6 +216,9 @@ cb_watch_toggle(DBusWatch *watch, void *data)
{
E_DBus_Handler_Data *hd;
if (_edbus_init_count <= 0)
return;
DDBG("Watch toggle on fd: %d (flags: %d) enable: %d",
dbus_watch_get_unix_fd(watch), dbus_watch_get_flags(watch),
dbus_watch_get_enabled(watch));
@ -330,7 +339,9 @@ e_dbus_connection_free(void *data)
E_DBus_Handler_Data *hd;
Ecore_Timer *timer;
Eina_List *l, *ll;
DBG("e_dbus_connection free!");
if (_edbus_init_count <= 0)
return;
EINA_LIST_FOREACH_SAFE(cd->fd_handlers, l, ll, hd)
e_dbus_fd_handler_del(hd);