diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-12-17 17:01:59 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-12-17 17:01:59 -0600 |
commit | 30c19a915e2223e858b0ec99364383559a05d58d (patch) | |
tree | ceb2fb34f3f70fc95dfaf3631445e2931ab46467 /src/call-forwarding.c | |
parent | 183624f870d84c98219f1539e45a95bd5d54ce26 (diff) | |
download | ofono-30c19a915e2223e858b0ec99364383559a05d58d.tar.bz2 |
call-forwarding: Properly signal changes
For the ForwardingFlagOnSim property
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r-- | src/call-forwarding.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c index 9188fbf1..512f2238 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -309,6 +309,14 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf, char attr[64]; char tattr[64]; gboolean update_sim = FALSE; + gboolean old_cfu; + gboolean new_cfu; + + if ((cf->flags & CALL_FORWARDING_FLAG_CPHS_CFF) || + cf->cfis_record_id > 0) + old_cfu = is_cfu_enabled(cf, NULL); + else + old_cfu = FALSE; for (l = list; l; l = l->next) { lc = l->data; @@ -418,6 +426,21 @@ static void set_new_cond_list(struct ofono_call_forwarding *cf, if (update_sim == TRUE) sim_set_cf_indicator(cf); + + if ((cf->flags & CALL_FORWARDING_FLAG_CPHS_CFF) || + cf->cfis_record_id > 0) + new_cfu = is_cfu_enabled(cf, NULL); + else + new_cfu = FALSE; + + if (new_cfu != old_cfu) { + ofono_bool_t status = new_cfu; + + ofono_dbus_signal_property_changed(conn, path, + OFONO_CALL_FORWARDING_INTERFACE, + "ForwardingFlagOnSim", + DBUS_TYPE_BOOLEAN, &status); + } } static inline void property_append_cf_condition(DBusMessageIter *dict, int cls, |