From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] Fix sending User Cancel response to Set Up Call.
Date: Thu, 09 Sep 2010 09:37:28 -0500 [thread overview]
Message-ID: <4C88F128.4040007@gmail.com> (raw)
In-Reply-To: <1283968796-5308-4-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]
Hi Andrew,
On 09/08/2010 12:59 PM, Andrzej Zaborowski wrote:
> One of the clean-up commits changed the semantics of the dial request
> callback's parameter (NULL if call setup failed, non-NULL if success
> or user cancelled).
> ---
> src/stk.c | 2 +-
> src/voicecall.c | 14 ++++++++++++++
> 2 files changed, 15 insertions(+), 1 deletions(-)
>
> diff --git a/src/stk.c b/src/stk.c
> index b469467..b6ed4c3 100644
> --- a/src/stk.c
> +++ b/src/stk.c
> @@ -1419,7 +1419,7 @@ static void call_setup_connected(struct ofono_call *call, void *data)
> static struct ofono_error error = { .type = OFONO_ERROR_TYPE_FAILURE };
> static unsigned char facility_rejected_result[] = { 0x9d };
>
> - if (!call) {
> + if (!call || call->status == CALL_STATUS_DISCONNECTED) {
If the call has been disconnected by the user, shouldn't we be sending
USER_CANCEL? At least that is what the old behavior implies.
> memset(&rsp, 0, sizeof(rsp));
>
> rsp.result.type = STK_RESULT_TYPE_NETWORK_UNAVAILABLE;
> diff --git a/src/voicecall.c b/src/voicecall.c
> index 3bd4dff..e536089 100644
> --- a/src/voicecall.c
> +++ b/src/voicecall.c
> @@ -361,6 +361,16 @@ static DBusMessage *voicecall_deflect(DBusConnection *conn,
> return NULL;
> }
>
> +static void dial_request_user_cancel(struct ofono_voicecall *vc,
> + struct voicecall *call)
> +{
> + if (!vc->dial_req)
> + return;
> +
> + if (!call || call == vc->dial_req->call)
> + dial_request_finish(vc->dial_req->call->vc, TRUE);
> +}
> +
> static DBusMessage *voicecall_hangup(DBusConnection *conn,
> DBusMessage *msg, void *data)
> {
> @@ -372,6 +382,8 @@ static DBusMessage *voicecall_hangup(DBusConnection *conn,
> if (vc->pending)
> return __ofono_error_busy(msg);
>
> + dial_request_user_cancel(vc, v);
> +
I don't see the need for this part, don't we already take care of this
in voicecall_set_call_status?
> switch (call->status) {
> case CALL_STATUS_DISCONNECTED:
> return __ofono_error_failed(msg);
> @@ -1278,6 +1290,8 @@ static DBusMessage *manager_hangup_all(DBusConnection *conn,
> return reply;
> }
>
> + dial_request_user_cancel(vc, NULL);
> +
Same as above...
> vc->flags |= VOICECALLS_FLAG_MULTI_RELEASE;
>
> vc->pending = dbus_message_ref(msg);
Regards,
-Denis
next prev parent reply other threads:[~2010-09-09 14:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 17:59 [PATCH] doc: Play Tone command proposed d-bus API Andrzej Zaborowski
2010-09-08 17:59 ` [PATCH 1/2][RfC] voicecall: __ofono_voicecall_send_tone internal api Andrzej Zaborowski
2010-09-08 17:59 ` [PATCH 2/2] stk: Handle the Send DTMF proactive command Andrzej Zaborowski
2010-09-08 17:59 ` [PATCH] Fix sending User Cancel response to Set Up Call Andrzej Zaborowski
2010-09-09 14:37 ` Denis Kenzior [this message]
2010-09-10 1:03 ` Andrzej Zaborowski
2010-09-10 2:46 ` Denis Kenzior
2010-09-09 16:23 ` [PATCH] doc: Play Tone command proposed d-bus API Marcel Holtmann
2010-09-10 1:12 ` andrzej zaborowski
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=4C88F128.4040007@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.