From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCHv3 05/12] call-forwarding: Minor cleanup of set_query_cf_callback
Date: Tue, 20 Mar 2012 18:54:44 -0500 [thread overview]
Message-ID: <4F6918C4.70803@gmail.com> (raw)
In-Reply-To: <1331646393-5249-6-git-send-email-oleg.zhurakivskyy@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]
Hi Oleg,
On 03/13/2012 08:46 AM, Oleg Zhurakivskyy wrote:
> ---
> src/call-forwarding.c | 26 +++++++++++---------------
> 1 files changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/src/call-forwarding.c b/src/call-forwarding.c
> index b1a1a72..7e5edcb 100644
> --- a/src/call-forwarding.c
> +++ b/src/call-forwarding.c
> @@ -631,32 +631,28 @@ static void set_query_cf_callback(const struct ofono_error *error, int total,
> void *data)
> {
> struct ofono_call_forwarding *cf = data;
> - GSList *l;
> - DBusMessage *reply;
>
> if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
> ofono_error("Setting succeeded, but query failed");
> cf->flags &= ~CALL_FORWARDING_FLAG_CACHED;
> - reply = __ofono_error_failed(cf->pending);
> - __ofono_dbus_pending_reply(&cf->pending, reply);
> + __ofono_dbus_pending_reply(&cf->pending,
> + __ofono_error_failed(cf->pending));
This looks fine...
> return;
> }
>
> - if (cf->query_next == cf->query_end) {
> - reply = dbus_message_new_method_return(cf->pending);
> - __ofono_dbus_pending_reply(&cf->pending, reply);
> - }
> -
Actually this part is here on purpose, we want to generate a reply
before we generate a signal for PropertyChanged.
> - l = cf_cond_list_create(total, list);
> - set_new_cond_list(cf, cf->query_next, l);
> + set_new_cond_list(cf, cf->query_next, cf_cond_list_create(total, list));
>
> DBG("%s conditions:", cf_type_lut[cf->query_next]);
> - cf_cond_list_print(l);
> + cf_cond_list_print(cf->cf_conditions[cf->query_next]);
>
> - if (cf->query_next != cf->query_end) {
> - cf->query_next++;
> - set_query_next_cf_cond(cf);
> + if (cf->query_next == cf->query_end) {
> + __ofono_dbus_pending_reply(&cf->pending,
> + dbus_message_new_method_return(cf->pending));
> + return;
> }
> +
> + cf->query_next++;
> + set_query_next_cf_cond(cf);
> }
>
> static void set_query_next_cf_cond(struct ofono_call_forwarding *cf)
Regards,
-Denis
next prev parent reply other threads:[~2012-03-20 23:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 13:46 [PATCHv3 00/12] Call forwarding state handling change Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 01/12] call-forwarding: Remove cf_list_clear() Oleg Zhurakivskyy
2012-03-19 19:03 ` Denis Kenzior
2012-03-13 13:46 ` [PATCHv3 02/12] call-forwarding: Inline get_query_next_cf_cond() Oleg Zhurakivskyy
2012-03-19 19:03 ` Denis Kenzior
2012-03-13 13:46 ` [PATCHv3 03/12] call-forwarding: Refactor cf_condition_find_with_cls() slightly Oleg Zhurakivskyy
2012-03-20 23:50 ` Denis Kenzior
2012-03-21 11:45 ` Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 04/12] call-forwarding: Refactor cf_find_unconditional() Oleg Zhurakivskyy
2012-03-20 23:51 ` Denis Kenzior
2012-03-21 11:46 ` Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 05/12] call-forwarding: Minor cleanup of set_query_cf_callback Oleg Zhurakivskyy
2012-03-20 23:54 ` Denis Kenzior [this message]
2012-03-21 11:47 ` Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 06/12] call-forwarding: Don't run conditional queries if cfu is active Oleg Zhurakivskyy
2012-03-21 0:09 ` Denis Kenzior
2012-03-21 11:49 ` Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 07/12] call-forwarding: Re-run conditional queries on cfu removal Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 08/12] call-forwarding: Toggle the cached flag on CFU changes Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 09/12] call-forwarding: Cache cfs on CFU removal Oleg Zhurakivskyy
2012-03-21 0:16 ` Denis Kenzior
2012-03-21 11:51 ` Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 10/12] call-forwarding: Re-run ss path cfs queries on cfu changes Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 11/12] call-forwarding: Cache cfs on all/all conditional removal Oleg Zhurakivskyy
2012-03-13 13:46 ` [PATCHv3 12/12] 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=4F6918C4.70803@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