diff options
author | Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> | 2012-02-06 14:33:57 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-02-22 04:52:14 -0600 |
commit | 0dc3515af468e23bfc0e934ed94c7ca23c06fde9 (patch) | |
tree | 1d313188be8234044bce20c3560c72c11970e88c /src/call-forwarding.c | |
parent | e4488eef1a186e9b715721f0f7e5a20525567bcf (diff) | |
download | ofono-0dc3515af468e23bfc0e934ed94c7ca23c06fde9.tar.gz |
call-forwarding: Update conditional reporting logic
Don't report conditional cfs when cfu is active
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r-- | src/call-forwarding.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c index 7d9b533c..b2b6aa29 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -503,6 +503,8 @@ static DBusMessage *cf_get_properties_reply(DBusMessage *msg, DBusMessageIter dict; int i; dbus_bool_t status; + gboolean cfu_enabled; + GSList *cf_list; reply = dbus_message_new_method_return(msg); if (reply == NULL) @@ -514,14 +516,25 @@ static DBusMessage *cf_get_properties_reply(DBusMessage *msg, OFONO_PROPERTIES_ARRAY_SIGNATURE, &dict); - for (i = 0; i < 4; i++) - property_append_cf_conditions(&dict, cf->cf_conditions[i], + cfu_enabled = is_cfu_enabled(cf); + + for (i = 0; i < 4; i++) { + /* + * Report conditional cfs as empty when CFU is active + */ + if (cfu_enabled && (i != CALL_FORWARDING_TYPE_UNCONDITIONAL)) + cf_list = NULL; + else + cf_list = cf->cf_conditions[i]; + + property_append_cf_conditions(&dict, cf_list, BEARER_CLASS_VOICE, cf_type_lut[i]); + } if ((cf->flags & CALL_FORWARDING_FLAG_CPHS_CFF) || cf->cfis_record_id > 0) - status = is_cfu_enabled(cf); + status = cfu_enabled; else status = FALSE; |