Open Source Telephony
 help / color / mirror / Atom feed
From: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
To: ofono@ofono.org
Subject: Re: [PATCHv4 11/13] call-forwarding: Re-run ss path queries on CFU unset
Date: Wed, 25 Apr 2012 13:59:12 +0300	[thread overview]
Message-ID: <4F97D900.7010701@intel.com> (raw)
In-Reply-To: <4F95C96C.5070508@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2134 bytes --]

Hello Denis,

On 04/24/2012 12:28 AM, Denis Kenzior wrote:
>> static void ss_set_query_cf_callback(const struct ofono_error *error, int total,
>>
>>   	set_new_cond_list(cf, cf->query_next, l);
>>
>> +	if (cf->query_next == CALL_FORWARDING_TYPE_UNCONDITIONAL&&
>> +			cf->query_next == cf->query_end) {
>> +		cf->flags |= CALL_FORWARDING_FLAG_CACHED;
>> +		/*
>> +		 * CFU has been disabled, conditionals need to be updated
>> +		 */
>> +		if (is_cfu_enabled(cf) == FALSE)
>> +			cf->query_end = CALL_FORWARDING_TYPE_NOT_REACHABLE;
>
> So a bit of background, the original set + query logic did not mess with
> the CACHED flag.  The assumption was that we're modifying a single
> property.  If the CACHED flag was already set, then the modification was
> queried and the CACHED flag was still valid.  If the CACHED flag was not
> set, then we'd re-query the entire thing anyway.
>
> Now we have a somewhat funny situation where when we clear CFU, we are
> essentially forced into querying everything.  The immediate problem with
> your approach is that we can't return from the method call until all
> settings have been queried.  By convention the core can have only a
> single outstanding call into the driver at a time.  We bend the rules
> somewhat, but in general we need to stick to this rule.  This is why you
> see busy error conditions everywhere.  So likely this needs a specific
> code path ...

OK, thanks, I see. Would it make sense to return the method immediately and then 
to re-query the conditionals? Or, just to wait until anybody needs them?

> Also, there is an optimization we can make here, e.g. if we queried the
> conditional forwarding settings prior to CFU being enabled, then we can
> keep those around.  This is why the TODO item refers to the 'conditional
> cache.'  In the case of CFU being flipped to enabled and then disabled,
> we do not need to query.

Thanks for the help here. Let's go for this approach too.

Regards,
Oleg
-- 
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki


  reply	other threads:[~2012-04-25 10:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 12:17 [PATCHv4 00/13] Call forwarding state handling change Oleg Zhurakivskyy
2012-04-10 12:17 ` [PATCHv4 01/13] call-forwarding: Refactor cf_condition_compare() Oleg Zhurakivskyy
2012-04-23 20:40   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 02/13] call-forwarding: Refactor cf_condition_find_with_cls() Oleg Zhurakivskyy
2012-04-23 20:42   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 03/13] call-forwarding: Get rid of extra variable Oleg Zhurakivskyy
2012-04-23 20:43   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 04/13] call-forwarding: Streamline number assignment Oleg Zhurakivskyy
2012-04-23 20:44   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 05/13] call-forwarding: Streamline cf_find_timeout() logic Oleg Zhurakivskyy
2012-04-23 20:44   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 06/13] call-forwarding: Refactor cf_find_unconditional() Oleg Zhurakivskyy
2012-04-23 20:45   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 07/13] call-forwarding: Streamline set_query_cf_callback() Oleg Zhurakivskyy
2012-04-23 20:45   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 08/13] call-forwarding: Remove unneeded variable Oleg Zhurakivskyy
2012-04-23 20:45   ` Denis Kenzior
2012-04-10 12:17 ` [PATCHv4 09/13] call-forwarding: End querying once cfu is active Oleg Zhurakivskyy
2012-04-23 21:12   ` Denis Kenzior
2012-04-25 10:58     ` Oleg Zhurakivskyy
2012-04-10 12:17 ` [PATCHv4 10/13] call-forwarding: CFU unset, update conditionals Oleg Zhurakivskyy
2012-04-23 21:06   ` Denis Kenzior
2012-04-25 10:58     ` Oleg Zhurakivskyy
2012-04-10 12:17 ` [PATCHv4 11/13] call-forwarding: Re-run ss path queries on CFU unset Oleg Zhurakivskyy
2012-04-23 21:28   ` Denis Kenzior
2012-04-25 10:59     ` Oleg Zhurakivskyy [this message]
2012-04-24 20:21       ` Denis Kenzior
2012-04-26  7:54         ` Oleg Zhurakivskyy
2012-04-10 12:17 ` [PATCHv4 12/13] call-forwarding: Cache ss TYPE_ALL modifications Oleg Zhurakivskyy
2012-04-23 21:38   ` Denis Kenzior
2012-04-25 10:59     ` Oleg Zhurakivskyy
2012-04-10 12:17 ` [PATCHv4 13/13] TODO: Remove completed call forwarding state task Oleg Zhurakivskyy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F97D900.7010701@intel.com \
    --to=oleg.zhurakivskyy@intel.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox