From: Frederic Danis <frederic.danis@linux.intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH V3 2/4] voicecall: add ATD support for HFP emulator
Date: Tue, 07 Jun 2011 14:58:00 +0200 [thread overview]
Message-ID: <4DEE2058.3000601@linux.intel.com> (raw)
In-Reply-To: <4DE6F0B4.10208@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]
Hello Denis,
Le 02/06/2011 04:08, Denis Kenzior a écrit :
>> +static void emulator_dial(struct ofono_emulator *em, struct ofono_voicecall *vc,
>> + const char *number)
>> +{
>> + struct ofono_error result;
>> + int err;
>> +
>> + result.error = 0;
>> +
>> + 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.
>
>> +
>> + vc->pending_em = em;
>> +
>> + err = voicecall_dial(vc, number, OFONO_CLIR_OPTION_DEFAULT,
>> + emulator_dial_callback, vc);
>> +
>> + if (err>= 0)
>> + return;
>> +
>> + vc->pending_em = NULL;
>> +
>> + switch (err) {
>> + case -ENETDOWN:
>> + result.error = 30;
>> + result.type = OFONO_ERROR_TYPE_CME;
>> + break;
>> +
>> + default:
>> + result.type = OFONO_ERROR_TYPE_FAILURE;
>> + }
>> +
>> +send:
>> + ofono_emulator_send_final(em,&result);
>> +}
>> +
Regards
Fred
--
Frederic Danis Open Source Technology Centre
frederic.danis(a)intel.com Intel Corporation
next prev parent reply other threads:[~2011-06-07 12:58 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 [this message]
2011-06-06 2:09 ` Denis Kenzior
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=4DEE2058.3000601@linux.intel.com \
--to=frederic.danis@linux.intel.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