All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH V3 2/4] voicecall: add ATD support for HFP emulator
Date: Sun, 05 Jun 2011 21:09:16 -0500	[thread overview]
Message-ID: <4DEC36CC.1060306@gmail.com> (raw)
In-Reply-To: <4DEE2058.3000601@linux.intel.com>

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

Hi Frederic,

<snip>

>>> +
>>> +    if (vc->pending_em) {
>>> +        result.type = OFONO_ERROR_TYPE_FAILURE;
>>> +        goto send;
>>> +    }
>>
>> You might also want to check that the Dial is not happening via D-Bus or
>> STK, and vice-versa.
> 
> Voicecall_dial will check if there is already a pending outgoing call.
> I think this is sufficient to manage concurrent ATD between D-Bus, STK
> and emulator.
> 

No, it isn't.  voicecall_dial only checks for dialing / alerting calls.
 However, you have to remember that the call isn't created until the
dial callback returns or ofono_voicecall_notify is called with the newly
created call.  This can take some time (e.g. due to queuing on the
GAtChat object), and during this time new Dial requests have to be rejected.

D-Bus API implementation handles this by using vc->pending (and it is a
bug that it doesn't check vc->dial_req).   STK handles this by checking
vc->pending and the existence of dial_req object.

Once you introduce the emulator, there is no cross-checking between the
emulator and the existing ways.  Between emulators you handle this by
using vc->pending_em, but you should also be checking that a Dial hasn't
been scheduled via STK/D-Bus API.

Regards,
-Denis

  reply	other threads:[~2011-06-06  2:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 11:24 [PATCH V3 0/4] Add dial support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-01 11:24 ` [PATCH V3 1/4] voicecall: create generic dial function =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-02  1:27   ` Denis Kenzior
2011-06-01 11:24 ` [PATCH V3 2/4] voicecall: add ATD support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-02  2:08   ` Denis Kenzior
2011-06-07 12:58     ` Frederic Danis
2011-06-06  2:09       ` Denis Kenzior [this message]
2011-06-07 15:01         ` Frederic Danis
2011-06-01 11:24 ` [PATCH V3 3/4] voicecall: save last dialed number =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis
2011-06-02  1:28   ` Denis Kenzior
2011-06-01 11:24 ` [PATCH V3 4/4] voicecall: add +BLDN support for HFP emulator =?unknown-8bit?q?Fr=C3=A9d=C3=A9ric?= Danis

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=4DEC36CC.1060306@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.