e: shutdown edbus only when page is hidden

We were missing a edbus_connection_unref() + edbus_shutdown() in case
neither connman responded or the timetout triggered. It's actually
easier to only shutdown edbus when page is hidden.



SVN revision: 81983
This commit is contained in:
Lucas De Marchi 2013-01-02 13:16:08 +00:00
parent e3787e1b41
commit 05049eeb63
1 changed files with 8 additions and 19 deletions

View File

@ -42,15 +42,6 @@ static EDBus_Connection *conn;
static EDBus_Pending *pending_connman;
static Ecore_Timer *connman_timeout = NULL;
static Eina_Bool
clean_dbus(void *data)
{
EDBus_Connection *conn2 = data;
edbus_connection_unref(conn2);
edbus_shutdown();
return EINA_FALSE;
}
static Eina_Bool
_connman_fail(void *data)
{
@ -77,11 +68,7 @@ _connman_fail(void *data)
edbus_pending_cancel(pending_connman);
pending_connman = NULL;
}
if (conn)
{
ecore_idler_add(clean_dbus, conn);
conn = NULL;
}
connman_timeout = NULL;
_recommend_connman(pg);
return EINA_FALSE;
@ -111,11 +98,7 @@ _check_connman_owner(void *data, const EDBus_Message *msg,
e_wizard_button_next_enable_set(1);
e_wizard_next();
if (conn)
{
ecore_idler_add(clean_dbus, conn);
conn = NULL;
}
fail:
_connman_fail(data);
}
@ -195,6 +178,12 @@ wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
ecore_timer_del(connman_timeout);
connman_timeout = NULL;
}
if (conn)
edbus_connection_unref(conn);
#ifdef HAVE_ECONNMAN
edbus_shutdown();
#endif
return 1;
}