diff options
author | Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com> | 2012-02-06 14:33:56 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-02-22 04:29:16 -0600 |
commit | e4488eef1a186e9b715721f0f7e5a20525567bcf (patch) | |
tree | a738fc1d6272fc00a01c8412a3d68fdc8258784e /src/call-forwarding.c | |
parent | 12076487aa37281d6adc9deb18c84de36cac198b (diff) | |
download | ofono-e4488eef1a186e9b715721f0f7e5a20525567bcf.tar.bz2 |
call-forwarding: Update conditional setting logic
Due to how the quiescent behavior of conditional call forwarding rules
when CFU is active, do not allow the user to try and set conditional
rules. This will fail at the network level anyway.
Diffstat (limited to 'src/call-forwarding.c')
-rw-r--r-- | src/call-forwarding.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/call-forwarding.c b/src/call-forwarding.c index 8b8d5a80..7d9b533c 100644 --- a/src/call-forwarding.c +++ b/src/call-forwarding.c @@ -802,6 +802,13 @@ static DBusMessage *cf_set_property(DBusConnection *conn, DBusMessage *msg, if (strlen(number) > 0 && !valid_phone_number_format(number)) return __ofono_error_invalid_format(msg); + /* + * Don't set conditional cfs when cfu is active + */ + if (type != CALL_FORWARDING_TYPE_UNCONDITIONAL && + number[0] != '\0' && is_cfu_enabled(cf)) + return __ofono_error_not_available(msg); + if (number[0] != '\0') string_to_phone_number(number, &ph); |