All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andras Domokos <andras.domokos@nokia.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 3/5] voicecall: implement SSN handling functions
Date: Mon, 14 Mar 2011 09:30:05 +0200	[thread overview]
Message-ID: <4D7DC3FD.1060401@nokia.com> (raw)
In-Reply-To: <4D7A7DDD.5000703@gmail.com>

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

Hi Denis,

On 03/11/2011 09:54 PM, ext Denis Kenzior wrote:
> Hi Andras,
>
>> +static struct voicecall *voicecall_select(struct ofono_voicecall *vc,
>> +						unsigned int id, int code)
>> +{
>> +	struct voicecall *v = NULL;
>> +	GSList *l;
>> +
>> +	if (id != 0) {
>> +		l = g_slist_find_custom(vc->call_list, GUINT_TO_POINTER(id),
>> +				call_compare_by_id);
>> +
>> +		if (l == NULL)
>> +			return NULL;
>> +
>> +		v = l->data;
>> +	} else if (g_slist_length(vc->call_list) == 1) {
>> +		v = vc->call_list->data;
>> +
>> +		switch (code) {
>> +		case SS_MT_VOICECALL_RETRIEVED:
>> +			if (v->remote_held != TRUE)
>> +				return NULL;
>> +			break;
>> +		case SS_MT_VOICECALL_ON_HOLD:
>> +			if (v->remote_held == TRUE)
>> +				return NULL;
>> +			break;
>> +		case SS_MT_MULTIPARTY_VOICECALL:
>> +			if (v->remote_multiparty == TRUE)
>> +				return NULL;
>> +			break;
>> +		default:
>> +			return NULL;
>> +		}
> I was mostly fine with this patch, but didn't see the real need in these
> checks, so I re-factored the patch slightly afterward.  Let me know if I
> broke something.
>

I am fine with your simplified version, I was a bit overly cautious
with those checks. Thanks!

>> +	}
>> +
>> +	return v;
>> +}
>> +
> Regards,
> -Denis

Regards,
Andras

  reply	other threads:[~2011-03-14  7:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-04 17:12 [PATCH 0/5] Voice call SS notifications (4th version) Andras Domokos
2011-03-04 17:12 ` [RFC PATCH 1/5] ssn: remove SSN atom completely Andras Domokos
2011-03-04 17:12 ` [RFC PATCH 2/5] voicecall: add SSN function declarations Andras Domokos
2011-03-04 17:12 ` [RFC PATCH 3/5] voicecall: implement SSN handling functions Andras Domokos
2011-03-11 19:54   ` Denis Kenzior
2011-03-14  7:30     ` Andras Domokos [this message]
2011-03-04 17:12 ` [RFC PATCH 4/5] atmodem: implement SSN handling Andras Domokos
2011-03-04 17:12 ` [RFC PATCH 5/5] isimodem: " Andras Domokos
2011-03-11 19:52 ` [PATCH 0/5] Voice call SS notifications (4th version) Denis Kenzior
2011-03-14  7:22   ` Andras Domokos

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=4D7DC3FD.1060401@nokia.com \
    --to=andras.domokos@nokia.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.