From e4488eef1a186e9b715721f0f7e5a20525567bcf Mon Sep 17 00:00:00 2001 From: Oleg Zhurakivskyy Date: Mon, 6 Feb 2012 14:33:56 +0200 Subject: 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. --- src/call-forwarding.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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); -- cgit v1.2.3