All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 3/5] voicecall: implement SSN handling functions
Date: Fri, 11 Mar 2011 13:54:05 -0600	[thread overview]
Message-ID: <4D7A7DDD.5000703@gmail.com> (raw)
In-Reply-To: <56722c85908a3516f0d5936cbef7b7e14c33efbd.1299258404.git.Andras.Domokos@nokia.com>

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

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.

> +	}
> +
> +	return v;
> +}
> +

Regards,
-Denis

  reply	other threads:[~2011-03-11 19:54 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 [this message]
2011-03-14  7:30     ` Andras Domokos
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=4D7A7DDD.5000703@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.