Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCHv2 6/8] call-forwarding: Don't run conditional queries if cfu is active
Date: Wed, 22 Feb 2012 07:24:30 -0600	[thread overview]
Message-ID: <4F44EC8E.90501@gmail.com> (raw)
In-Reply-To: <1328531641-10612-7-git-send-email-oleg.zhurakivskyy@intel.com>

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

Hi Oleg,

On 02/06/2012 06:33 AM, Oleg Zhurakivskyy wrote:
> ---
>  src/call-forwarding.c |   18 +++++++++++-------
>  1 files changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/src/call-forwarding.c b/src/call-forwarding.c
> index 7b086e0..2813005 100644
> --- a/src/call-forwarding.c
> +++ b/src/call-forwarding.c
> @@ -584,20 +584,24 @@ static void get_query_cf_callback(const struct ofono_error *error, int total,
>  	struct ofono_call_forwarding *cf = data;
>  
>  	if (error->type == OFONO_ERROR_TYPE_NO_ERROR) {
> -		GSList *l;
> -		l = cf_cond_list_create(total, list);
> +		GSList *l = cf_cond_list_create(total, list);
> +
>  		set_new_cond_list(cf, cf->query_next, l);
>  
>  		DBG("%s conditions:", cf_type_lut[cf->query_next]);
> +
>  		cf_cond_list_print(l);

I separated out two above chunks as a separate patch and applied them,
since they are just cleanup anyway.


> +	}
>  
> -		if (cf->query_next == CALL_FORWARDING_TYPE_NOT_REACHABLE)
> +	if ((is_cfu_enabled(cf) &&
> +			cf->query_next == CALL_FORWARDING_TYPE_UNCONDITIONAL) ||
> +			cf->query_next == CALL_FORWARDING_TYPE_NOT_REACHABLE) {
> +
> +		if (error->type == OFONO_ERROR_TYPE_NO_ERROR)
>  			cf->flags |= CALL_FORWARDING_FLAG_CACHED;
> -	}
>  
> -	if (cf->query_next == CALL_FORWARDING_TYPE_NOT_REACHABLE) {
> -		DBusMessage *reply = cf_get_properties_reply(cf->pending, cf);
> -		__ofono_dbus_pending_reply(&cf->pending, reply);
> +		__ofono_dbus_pending_reply(&cf->pending,
> +				cf_get_properties_reply(cf->pending, cf));
>  		return;
>  	}
>  

The rest is on the right track, however I don't think this really works
in the case where CFU is set when the query is being performed for the
first time.

e.g.
- GetProperties -> query all
- CFU is set, so don't query conditionals (which is correct since they
are useless)
- CFU is removed -> conditionals need to be updated now since they don't
reflect reality

Regards,
-Denis

  reply	other threads:[~2012-02-22 13:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-06 12:33 [PATCHv2 0/8] Call forwarding state handling change Oleg Zhurakivskyy
2012-02-06 12:33 ` [PATCHv2 1/8] call-forwarding: Minor style fixes Oleg Zhurakivskyy
2012-02-22 10:25   ` Denis Kenzior
2012-02-06 12:33 ` [PATCHv2 2/8] call-forwarding: Minor refactoring of is_cfu_enabled() Oleg Zhurakivskyy
2012-02-22 10:25   ` Denis Kenzior
2012-02-06 12:33 ` [PATCHv2 3/8] call-forwarding: Don't set conditional cfs when cfu is active Oleg Zhurakivskyy
2012-02-22 10:34   ` Denis Kenzior
2012-02-06 12:33 ` [PATCHv2 4/8] call-forwarding: Don't report " Oleg Zhurakivskyy
2012-02-22 13:19   ` Denis Kenzior
2012-02-06 12:33 ` [PATCHv2 5/8] call-forwarding: Emit signals to mask/unmask conditional cfs Oleg Zhurakivskyy
2012-02-22 13:19   ` Denis Kenzior
2012-02-06 12:33 ` [PATCHv2 6/8] call-forwarding: Don't run conditional queries if cfu is active Oleg Zhurakivskyy
2012-02-22 13:24   ` Denis Kenzior [this message]
2012-02-23  9:51     ` Oleg Zhurakivskyy
2012-02-06 12:34 ` [PATCHv2 7/8] call-forwarding: Clear the conditional cache flag Oleg Zhurakivskyy
2012-02-22 13:33   ` Denis Kenzior
2012-02-23  9:52     ` Oleg Zhurakivskyy
2012-02-06 12:34 ` [PATCHv2 8/8] 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=4F44EC8E.90501@gmail.com \
    --to=denkenz@gmail.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