From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [isi-voicecall-fix PATCHv3 1/6] voicecall: fix dial result handling
Date: Mon, 22 Nov 2010 07:43:56 -0600 [thread overview]
Message-ID: <4CEA739C.4070401@gmail.com> (raw)
In-Reply-To: <1289927124-30133-1-git-send-email-Pekka.Pessi@nokia.com>
[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]
Hi Pekka,
On 11/16/2010 11:05 AM, Pekka.Pessi(a)nokia.com wrote:
> From: Pekka Pessi <Pekka.Pessi@nokia.com>
>
> If there is an existing active call when dialing the existing call will
> be automatically put on hold. The dialing result handling depended on
> the voicecall driver putting the call on hold before the dial command
> callback is called.
>
> However, this is not true on isimodem driver, where the dial request
> returns immediately before the existing call have changed its
> status. The dial result handling now checks if the active call has been
> resulted from the dial request.
> ---
> src/voicecall.c | 18 ++++++++++++++++--
> 1 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/src/voicecall.c b/src/voicecall.c
> index bd64432..e3ce2a5 100644
> --- a/src/voicecall.c
> +++ b/src/voicecall.c
> @@ -68,6 +68,7 @@ struct voicecall {
> char *message;
> uint8_t icon_id;
> gboolean untracked;
> + gboolean dial_result_handled;
> };
>
> struct dial_request {
> @@ -1096,9 +1097,20 @@ static struct voicecall *dial_handle_result(struct ofono_voicecall *vc,
> v = l->data;
>
> if (v->call->status == CALL_STATUS_DIALING ||
> - v->call->status == CALL_STATUS_ALERTING ||
> - v->call->status == CALL_STATUS_ACTIVE)
> + v->call->status == CALL_STATUS_ALERTING)
> return v;
> +
> + /*
> + * Dial request may return before existing active call
> + * is put on hold or after dialed call has got active
> + */
> + if (v->call->status == CALL_STATUS_ACTIVE &&
> + v->call->direction ==
> + CALL_DIRECTION_MOBILE_ORIGINATED &&
> + !v->dial_result_handled) {
> + v->dial_result_handled = TRUE;
> + return v;
> + }
I really don't see how this can work, since you never reset
dial_result_handled to FALSE anywhere.
> }
>
> call = synthesize_outgoing_call(vc, number);
> @@ -1119,6 +1131,8 @@ static struct voicecall *dial_handle_result(struct ofono_voicecall *vc,
>
> *need_to_emit = TRUE;
>
> + v->dial_result_handled = TRUE;
> +
dial_handle_result is ever called once, why do you need to set this here?
> return v;
> }
>
This seems to be the wrong way to go, is there any way for you to delay
returning from the dial operation until the call is put on hold?
Regards,
-Denis
next prev parent reply other threads:[~2010-11-22 13:43 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 17:05 [isi-voicecall-fix PATCHv3 1/6] voicecall: fix dial result handling Pekka.Pessi
2010-11-16 17:05 ` [isi-voicecall-fix PATCHv3 2/6] isi/voicecall: fix status reporting Pekka.Pessi
2010-11-16 17:05 ` [isi-voicecall-fix PATCHv3 3/6] isi/voicecall: save call id when queueing requests Pekka.Pessi
2010-11-16 17:05 ` [isi-voicecall-fix PATCHv3 4/6] isi/voicecall: fix answering early incoming calls Pekka.Pessi
2010-11-16 17:05 ` [isi-voicecall-fix PATCHv3 5/6] isi/voicecall: release COMING calls with BUSY cause Pekka.Pessi
2010-11-16 17:05 ` [isi-voicecall-fix PATCHv3 6/6] isi/voicecall: fix isi_release_all_active() Pekka.Pessi
2010-11-22 14:21 ` [isi-voicecall-fix PATCHv3 5/6] isi/voicecall: release COMING calls with BUSY cause Denis Kenzior
2010-11-22 14:19 ` [isi-voicecall-fix PATCHv3 4/6] isi/voicecall: fix answering early incoming calls Denis Kenzior
2010-11-22 16:22 ` Pekka Pessi
2010-11-22 16:38 ` Denis Kenzior
2010-11-22 14:16 ` [isi-voicecall-fix PATCHv3 3/6] isi/voicecall: save call id when queueing requests Denis Kenzior
2010-11-22 14:14 ` [isi-voicecall-fix PATCHv3 2/6] isi/voicecall: fix status reporting Denis Kenzior
2010-11-22 16:09 ` Pekka Pessi
2010-11-22 16:37 ` Denis Kenzior
2010-11-22 13:43 ` Denis Kenzior [this message]
2010-11-22 16:50 ` [isi-voicecall-fix PATCHv3 1/6] voicecall: fix dial result handling Pekka Pessi
2010-11-22 17:27 ` Denis Kenzior
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=4CEA739C.4070401@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.