Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/2] Add Suspended property to GPRS atom
Date: Thu, 09 Sep 2010 12:57:29 -0500	[thread overview]
Message-ID: <4C892009.2010203@gmail.com> (raw)
In-Reply-To: <1284034091-8288-2-git-send-email-mika.liljeberg@nokia.com>

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

Hi Mika,

On 09/09/2010 07:08 AM, Mika Liljeberg wrote:
> 
> Signed-off-by: Mika Liljeberg <mika.liljeberg@nokia.com>

We don't use Signed-off-by, could you please configure your git not to
include it?  The only other nitpick I have is on your commit header, it
should include gprs: prefix.  E.g.

gprs: add Suspended property...

We do this to help people quickly scan git log and figure out whether a
patch potentially affects the area they are interested in.

> ---
>  doc/connman-api.txt |   19 ++++++++++++++
>  include/gprs.h      |   10 +++++++
>  src/gprs.c          |   69 +++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 98 insertions(+), 0 deletions(-)
> 
> diff --git a/doc/connman-api.txt b/doc/connman-api.txt
> index 43d8897..b576e19 100644
> --- a/doc/connman-api.txt
> +++ b/doc/connman-api.txt
> @@ -77,6 +77,25 @@ Properties	boolean Attached [readonly]
>  			be available, e.g. receiving SMS over packet radio
>  			or network initiated PDP activation.
>  
> +		boolean Suspended [readonly]

My only thought here is that we should also make Suspended property
optional.  My thought here is that if we're not 'Attached', then
reporting Suspended is not really useful.

> @@ -1052,6 +1114,9 @@ static DBusMessage *gprs_get_properties(DBusConnection *conn,
>  	value = gprs->powered;
>  	ofono_dbus_dict_append(&dict, "Powered", DBUS_TYPE_BOOLEAN, &value);
>  
> +	value = gprs->suspended;
> +	ofono_dbus_dict_append(&dict, "Suspended", DBUS_TYPE_BOOLEAN, &value);
> +
>  	dbus_message_iter_close_container(&iter, &dict);
>  
>  	return reply;

See my comment above here, perhaps we should only include this in the
dict if Attached is true.

> @@ -1697,6 +1762,9 @@ static void gprs_remove(struct ofono_atom *atom)
>  	if (gprs == NULL)
>  		return;
>  
> +	if (gprs->suspend_timeout)
> +		g_source_remove(gprs->suspend_timeout);
> +
>  	if (gprs->pid_map) {
>  		idmap_free(gprs->pid_map);
>  		gprs->pid_map = NULL;
> @@ -1746,6 +1814,7 @@ struct ofono_gprs *ofono_gprs_create(struct ofono_modem *modem,
>  
>  	gprs->status = NETWORK_REGISTRATION_STATUS_UNKNOWN;
>  	gprs->netreg_status = NETWORK_REGISTRATION_STATUS_UNKNOWN;
> +	gprs->suspended = TRUE;
>  	gprs->pid_map = idmap_new(MAX_CONTEXTS);
>  
>  	return gprs;

And this could be just set to FALSE (or not set since the structure is
zeroed)

Otherwise patch looks great.

Another housekeeping item: Please send a patch taking ownership of this
task on the TODO list.  See ofono/TODO, the GPRS section.  This way
others know not to interfere with your work.

Regards,
-Denis

  reply	other threads:[~2010-09-09 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-09 12:08 Add Suspended property to GPRS (take 2) Mika Liljeberg
2010-09-09 12:08 ` [PATCH 1/2] Add Suspended property to GPRS atom Mika Liljeberg
2010-09-09 17:57   ` Denis Kenzior [this message]
2010-09-09 12:08 ` [PATCH 2/2] isimodem: implement Suspended property Mika Liljeberg
2010-09-09 17:59   ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2010-09-08  9:16 [PATCH 0/2] Add Suspended property to GPRS Mika Liljeberg
2010-09-08  9:17 ` [PATCH 1/2] Add Suspended property to GPRS atom Mika Liljeberg

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=4C892009.2010203@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox