Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCHv2 1/2] hfpmodem: Retry AT+CLCC request after outgoing callsetup
Date: Wed, 30 Jan 2013 21:50:51 -0600	[thread overview]
Message-ID: <5109EA1B.1010407@gmail.com> (raw)
In-Reply-To: <07c8015b845d8b1a310dc9f33397cda7dd42e4a2.1359360111.git.timo.mueller@bmw-carit.de>

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

Hi Timo,

<snip>

> +static void clcc_poll_dialing_cb(gboolean ok, GAtResult *result,
> +			gpointer user_data)
> +{
> +	struct ofono_voicecall *vc = user_data;
> +	struct voicecall_data *vd = ofono_voicecall_get_data(vc);
> +	GSList *calls, *dialing;
> +
> +	if (!ok)
> +		return;
> +
> +	calls = at_util_parse_clcc(result);
> +	dialing = find_dialing(calls);
> +
> +	if (dialing == NULL) {
> +		if (vd->clcc_source)
> +			g_source_remove(vd->clcc_source);
> +
> +		vd->clcc_source = g_timeout_add(POLL_CLCC_DELAY,
> +												poll_clcc, vc);
> +		return;
> +	}
> +
> +	clcc_poll_cb(ok, result, user_data);

I'm not entirely happy that we parse the CLCC list twice here, once in 
this function and once in the clcc_poll_cb.  Would setting a flag in 
ciev_callsetup_notify and checking it in clcc_poll_cb be a better idea?

e.g.
if (num_active > 1 || num_held > 1)
	vd->clcc_source = g_timeout_add(POLL_CLCC_INTERVAL, poll_clcc,
                                                         vc);

would go into something like:

poll_again = num_active > 1 || num_held > 1;
if (vd->flags & FLAG_NOKIA_N9_BROKEN_DIAL) {
	poll_again = TRUE;
	vd->flags &= FLAG_NOKIA_N9_BROKEN_DIAL;
}

if (poll_again)
	....

Regards,
-Denis

      parent reply	other threads:[~2013-01-31  3:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1359360111.git.timo.mueller@bmw-carit.de>
2013-01-28 10:13 ` [PATCHv2 1/2] hfpmodem: Retry AT+CLCC request after outgoing callsetup Timo Mueller
2013-01-28 10:13   ` [PATCHv2 2/2] hfpmodem: Request AT+CLCC again after callheld=<2 or 3> Timo Mueller
2013-01-31  4:09     ` Denis Kenzior
2013-02-04 16:20       ` Timo =?unknown-8bit?q?M=C3=BCller?=
2013-02-03  3:23         ` Denis Kenzior
2013-01-31  3:50   ` Denis Kenzior [this message]

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=5109EA1B.1010407@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