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 11:27:26 -0600 [thread overview]
Message-ID: <4CEAA7FE.1080908@gmail.com> (raw)
In-Reply-To: <AANLkTi=s92Bwsw3Tvd0FzZkjWZYRQs3X2PfOMCXVN1oU@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2384 bytes --]
Hi Pekka,
>>> + gboolean dial_result_handled;
>>> };
So I'm finally beginning to understand where you're going with this..
>>>
>>> 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;
So if I understand correctly, you want to set dial_result_handled to
TRUE here as well, right?
>>> +
>>> + /*
>>> + * 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.
>
> Huh? voicecall_create() uses g_new0().
>
So that is the piece I was missing. Now I understand, thanks.
> For each outbound call there should be exactly one dial request, once
> that is returned in dial_handle_result(), the dial_result_handled
> should be TRUE.
>
> I'll fix the above code.
Are you referring to setting dial_result_handled to TRUE for
ALERTING/DIALING or something else?
>
>>> }
>>>
>>> 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?
>
> This prevents mixing this call with the call dialed next.
>
And this one makes sense now as well. So I'm actually fine with the
fix. Do you want to resend the patch?
Regards,
-Denis
prev parent reply other threads:[~2010-11-22 17:27 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 ` [isi-voicecall-fix PATCHv3 1/6] voicecall: fix dial result handling Denis Kenzior
2010-11-22 16:50 ` Pekka Pessi
2010-11-22 17:27 ` 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=4CEAA7FE.1080908@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