Open Source Telephony
 help / color / mirror / Atom feed
From: Guillaume Zajac <guillaume.zajac@linux.intel.com>
To: ofono@ofono.org
Subject: Re: [PATCH_v2] atmodem: Fix crash on context activation.
Date: Thu, 10 May 2012 17:43:37 +0200	[thread overview]
Message-ID: <4FABE229.8020402@linux.intel.com> (raw)
In-Reply-To: <1334581740-6681-1-git-send-email-guillaume.zajac@linux.intel.com>

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

Hi Denis,

On 16/04/2012 15:09, Guillaume Zajac wrote:
> Shutdown PPP session if modem did not do it.
> ---
>   drivers/atmodem/gprs-context.c |   11 +++++++++++
>   1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c
> index 16893ce..100c80b 100644
> --- a/drivers/atmodem/gprs-context.c
> +++ b/drivers/atmodem/gprs-context.c
> @@ -239,6 +239,17 @@ static void at_gprs_activate_primary(struct ofono_gprs_context *gc,
>   	memcpy(gcd->username, ctx->username, sizeof(ctx->username));
>   	memcpy(gcd->password, ctx->password, sizeof(ctx->password));
>
> +	/*
> +	 * For some modem, mainly Huawei branded, when GPRS is no more attached
> +	 * to the network, oFono core will reset context although the modem
> +	 * has not ended ppp sesssion at driver level.
> +	 * In this case trigger a disconnection manually and send an error.
> +	 */
> +	if (gcd->ppp != NULL&&  gcd->state == STATE_ACTIVE) {
> +		g_at_ppp_shutdown(gcd->ppp);
> +		goto error;
> +	}
> +
>   	gcd->state = STATE_ENABLING;
>
>   	if (gcd->vendor == OFONO_VENDOR_ZTE) {

Do you have any feedback on this fix?

Thanks.

Kind regards,
Guillaume

      reply	other threads:[~2012-05-10 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 13:09 [PATCH_v2] atmodem: Fix crash on context activation Guillaume Zajac
2012-05-10 15:43 ` Guillaume Zajac [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=4FABE229.8020402@linux.intel.com \
    --to=guillaume.zajac@linux.intel.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