All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] Add STE modem support for GPRS PDP Contexts
Date: Wed, 27 Jan 2010 14:13:27 -0600	[thread overview]
Message-ID: <201001271413.27892.denkenz@gmail.com> (raw)
In-Reply-To: <1264536807-10462-1-git-send-email-sjur.brandeland@stericsson.com>

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

Hi Sjur,

> From: Sjur Brændeland <sjur.brandeland@stericsson.com>
> 
> ---
>  Makefile.am                     |    3 +-
>  drivers/stemodem/gprs-context.c |  610
>  +++++++++++++++++++++++++++++++++++++++ drivers/stemodem/stemodem.c     | 
>    3 +
>  drivers/stemodem/stemodem.h     |    4 +
>  plugins/ste.c                   |    2 +-
>  5 files changed, 620 insertions(+), 2 deletions(-)
>  create mode 100644 drivers/stemodem/gprs-context.c

I have applied the patch with some major style fixes afterward.  A couple of 
comments:

I have changed AT*EIAAUW handling to be just like MBM modems.  See my commit 
message for details, but basically you were leaking memory here.  If my 
changes for some reason have broken something, please send an updated patch.  
I can't test it here for obvious reasons :)

> +static void ste_eppsd_up_cb(gboolean ok, GAtResult *result, gpointer
>  user_data) +{
> +	if (!caif_if_create(conn->interface, conn->channel_id)) {
> +		ofono_error("Failed to create caif interface %s.",
> +			conn->interface);
> +		CALLBACK_WITH_SUCCESS(cb, NULL, FALSE, rsp.ip_address,
> +				rsp.subnet_mask, rsp.default_gateway,
> +				dns, cbd->data);
> +	} else {
> +		CALLBACK_WITH_SUCCESS(cb, conn->interface,
> +				FALSE, rsp.ip_address, rsp.subnet_mask,
> +				rsp.default_gateway, dns, cbd->data);
> +	}
> +	return;

I really don't like returning SUCCESS with a null interface in case the 
interface creation failed.  Can we return an error here and generate a context 
deactivation command?

Regards,
-Denis

      reply	other threads:[~2010-01-27 20:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-26 20:13 [PATCH] Add STE modem support for GPRS PDP Contexts sjur.brandeland
2010-01-27 20:13 ` Denis Kenzior [this message]

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=201001271413.27892.denkenz@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.