All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] isimodem: use a specific call id when answering
Date: Thu, 28 Apr 2011 09:28:52 -0500	[thread overview]
Message-ID: <4DB979A4.8010300@gmail.com> (raw)
In-Reply-To: <1303908309-28914-1-git-send-email-Pekka.Pessi@nokia.com>

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

Hi Pekka,

On 04/27/2011 07:45 AM, Pekka.Pessi(a)nokia.com wrote:
> From: Pekka Pessi <Pekka.Pessi@nokia.com>
> 
> ---
>  drivers/isimodem/voicecall.c |   22 +++++++++++++++++++++-
>  1 files changed, 21 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/isimodem/voicecall.c b/drivers/isimodem/voicecall.c
> index 333f9b8..4d4e16b 100644
> --- a/drivers/isimodem/voicecall.c
> +++ b/drivers/isimodem/voicecall.c
> @@ -1480,7 +1480,27 @@ static void isi_dial(struct ofono_voicecall *ovc,
>  static void isi_answer(struct ofono_voicecall *ovc, ofono_voicecall_cb_t cb,
>  			void *data)
>  {
> -	isi_call_answer_req(ovc, CALL_ID_ALL, cb, data);
> +	struct isi_voicecall *ivc = ofono_voicecall_get_data(ovc);
> +	int id;
> +
> +	for (id = 1; id <= 7; id++) {
> +		switch (ivc->calls[id].status) {
> +		case CALL_STATUS_COMING:
> +		case CALL_STATUS_MT_ALERTING:
> +		case CALL_STATUS_WAITING:

oFono expects answer to only work on 'incoming' calls in the traditional
sense.  Is waiting status equivalent to CCWA here? If so, it might be
better to leave it out here.

> +			goto answer;
> +		case CALL_STATUS_PROCEEDING:
> +			if (ivc->calls[id].mode_info & CALL_MODE_ORIGINATOR)
> +				goto answer;
> +			break;
> +		}
> +	}
> +
> +	CALLBACK_WITH_FAILURE(cb, data);
> +	return;
> +
> +answer:
> +	isi_call_answer_req(ovc, id, cb, data);
>  }
>  
>  static void isi_hangup_current(struct ofono_voicecall *ovc,

Regards,
-Denis

  reply	other threads:[~2011-04-28 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-27 12:45 [PATCH] isimodem: use a specific call id when answering Pekka.Pessi
2011-04-28 14:28 ` Denis Kenzior [this message]
2011-05-03 19:10   ` Pekka Pessi

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=4DB979A4.8010300@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.