diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-12-17 16:50:14 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-12-17 16:50:33 -0600 |
commit | 183624f870d84c98219f1539e45a95bd5d54ce26 (patch) | |
tree | 1baebeabcdf258c2e437b705ff7dc90db81042cf /src/call-forwarding.c | |
parent | 212b291e15021c6ea3d8d23a1f17537a1f426ff6 (diff) | |
download | ofono-183624f870d84c98219f1539e45a95bd5d54ce26.tar.bz2 |
call-forwarding: Get rid of status_on_sim variable
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r-- | src/call-forwarding.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c index ad140bcb..9188fbf1 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -62,7 +62,6 @@ struct ofono_call_forwarding { struct cf_ss_request *ss_req; struct ofono_sim *sim; unsigned char cfis_record_id; - ofono_bool_t status_on_sim; struct ofono_ussd *ussd; unsigned int ussd_watch; const struct ofono_call_forwarding_driver *driver; @@ -496,7 +495,12 @@ static DBusMessage *cf_get_properties_reply(DBusMessage *msg, BEARER_CLASS_VOICE, cf_type_lut[i]); - status = cf->status_on_sim; + if ((cf->flags & CALL_FORWARDING_FLAG_CPHS_CFF) || + cf->cfis_record_id > 0) + status = is_cfu_enabled(cf, NULL); + else + status = FALSE; + ofono_dbus_dict_append(&dict, "ForwardingFlagOnSim", DBUS_TYPE_BOOLEAN, &status); @@ -1273,8 +1277,8 @@ static void sim_cfis_read_cb(int ok, int total_length, int record, if (cond == NULL) return; - status = cf->status_on_sim = TRUE; - cond->status = status; + status = TRUE; + cond->status = TRUE; cond->cls = BEARER_CLASS_VOICE; cond->time = 0; cond->phone_number.type = ton_npi; @@ -1320,7 +1324,10 @@ static void sim_cphs_cff_read_cb(int ok, int total_length, int record, * For now we only support Voice, although Fax & all Data * basic services are applicable as well. */ - cfu_voice = cf->status_on_sim = ((data[0] & 0xf) == 0xa); + if ((data[0] & 0xf) != 0xA) + return; + + cfu_voice = TRUE; ofono_dbus_signal_property_changed(conn, path, OFONO_CALL_FORWARDING_INTERFACE, |