summaryrefslogtreecommitdiffstats
path: root/src/call-forwarding.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2011-04-05 00:07:43 -0500
committerDenis Kenzior <denkenz@gmail.com>2011-04-05 00:07:43 -0500
commit9464dc32b4012fa033a626a181188807181e6025 (patch)
treefce3f64b8a2a707d5636644b5aea3be1fe2a2cc4 /src/call-forwarding.c
parentee5282aac912f6e58dcb8e76782965f478bc1c95 (diff)
downloadofono-9464dc32b4012fa033a626a181188807181e6025.tar.bz2
call-forwarding: Move to avoid forward-decl
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r--src/call-forwarding.c51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c
index ef8f10a2..2068d6bc 100644
--- a/src/call-forwarding.c
+++ b/src/call-forwarding.c
@@ -73,7 +73,6 @@ struct ofono_call_forwarding {
static void get_query_next_cf_cond(struct ofono_call_forwarding *cf);
static void set_query_next_cf_cond(struct ofono_call_forwarding *cf);
static void ss_set_query_next_cf_cond(struct ofono_call_forwarding *cf);
-static void call_forwarding_unregister(struct ofono_atom *atom);
struct cf_ss_request {
int ss_type;
@@ -1364,6 +1363,31 @@ static void sim_cphs_cff_read_cb(int ok, int total_length, int record,
DBUS_TYPE_BOOLEAN, &cfu_voice);
}
+static void call_forwarding_unregister(struct ofono_atom *atom)
+{
+ struct ofono_call_forwarding *cf = __ofono_atom_get_data(atom);
+ const char *path = __ofono_atom_get_path(cf->atom);
+ DBusConnection *conn = ofono_dbus_get_connection();
+ struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom);
+
+ ofono_modem_remove_interface(modem, OFONO_CALL_FORWARDING_INTERFACE);
+ g_dbus_unregister_interface(conn, path,
+ OFONO_CALL_FORWARDING_INTERFACE);
+
+ if (cf->sim_context) {
+ ofono_sim_context_free(cf->sim_context);
+ cf->sim_context = NULL;
+ }
+
+ if (cf->ussd)
+ cf_unregister_ss_controls(cf);
+
+ if (cf->ussd_watch)
+ __ofono_modem_remove_atom_watch(modem, cf->ussd_watch);
+
+ cf->flags = 0;
+}
+
static void sim_cfis_changed(int id, void *userdata)
{
struct ofono_call_forwarding *cf = userdata;
@@ -1424,31 +1448,6 @@ void ofono_call_forwarding_driver_unregister(const struct ofono_call_forwarding_
g_drivers = g_slist_remove(g_drivers, (void *) d);
}
-static void call_forwarding_unregister(struct ofono_atom *atom)
-{
- struct ofono_call_forwarding *cf = __ofono_atom_get_data(atom);
- const char *path = __ofono_atom_get_path(cf->atom);
- DBusConnection *conn = ofono_dbus_get_connection();
- struct ofono_modem *modem = __ofono_atom_get_modem(cf->atom);
-
- ofono_modem_remove_interface(modem, OFONO_CALL_FORWARDING_INTERFACE);
- g_dbus_unregister_interface(conn, path,
- OFONO_CALL_FORWARDING_INTERFACE);
-
- if (cf->sim_context) {
- ofono_sim_context_free(cf->sim_context);
- cf->sim_context = NULL;
- }
-
- if (cf->ussd)
- cf_unregister_ss_controls(cf);
-
- if (cf->ussd_watch)
- __ofono_modem_remove_atom_watch(modem, cf->ussd_watch);
-
- cf->flags = 0;
-}
-
static void call_forwarding_remove(struct ofono_atom *atom)
{
struct ofono_call_forwarding *cf = __ofono_atom_get_data(atom);