summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-08-17 16:03:01 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-08-17 16:03:01 -0500
commit2ebef58855657bbd0633eb94b6663fbdf2e85c3d (patch)
tree471f7017976995494b5cb8db56c46aade9b6ac08
parent2e432b6ca0308cd821245abfe26bbae151ac15e6 (diff)
downloadofono-2ebef58855657bbd0633eb94b6663fbdf2e85c3d.tar.bz2
Refactor ECC Support: Don't bother with g_source
Don't bother playing the g_source tricks for EmergencyNumbers property changed signal emission. The list is not bound to change more than once.
-rw-r--r--src/voicecall.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index 5f5f263e..43d35ed8 100644
--- a/src/voicecall.c
+++ b/src/voicecall.c
@@ -54,7 +54,6 @@ struct voicecalls_data {
DBusMessage *pending;
gint emit_calls_source;
gint emit_multi_source;
- gint emit_en_source;
};
struct voicecall {
@@ -501,11 +500,6 @@ static void voicecalls_destroy(gpointer userdata)
calls->emit_multi_source = 0;
}
- if (calls->emit_en_source) {
- g_source_remove(calls->emit_en_source);
- calls->emit_en_source = 0;
- }
-
if (calls->en_list) {
g_slist_foreach(calls->en_list, (GFunc)g_free, NULL);
g_slist_free(calls->en_list);
@@ -1692,9 +1686,8 @@ static gboolean in_default_en_list(char *en)
return FALSE;
}
-static gboolean real_emit_en_list_changed(void *data)
+static void emit_en_list_changed(struct ofono_modem *modem)
{
- struct ofono_modem *modem = data;
struct voicecalls_data *calls = modem->voicecalls;
DBusConnection *conn = ofono_dbus_get_connection();
char **list;
@@ -1711,22 +1704,6 @@ static gboolean real_emit_en_list_changed(void *data)
&list);
g_strfreev(list);
- calls->emit_en_source = 0;
-
- return FALSE;
-}
-
-static void emit_en_list_changed(struct ofono_modem *modem)
-{
-#ifdef DELAY_EMIT
- struct voicecalls_data *calls = modem->voicecalls;
-
- if (calls->emit_en_source == 0)
- calls->emit_en_source =
- g_timeout_add(0, real_emit_en_list_changed, modem);
-#else
- real_emit_en_list_changed(modem);
-#endif
}
static void add_to_list(GSList **l, const char **list)