Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/2] emulator: Fix crash when dundee is disconnecting
Date: Fri, 22 Jun 2012 02:46:04 -0500	[thread overview]
Message-ID: <4FE422BC.3040507@gmail.com> (raw)
In-Reply-To: <1340633992-14599-2-git-send-email-guillaume.zajac@linux.intel.com>

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

Hi Guillaume,

On 06/25/2012 09:19 AM, Guillaume Zajac wrote:
> Dundee is not waiting to receive the NO CARRIER notification
> to close the IO channel with oFono so that oFono is trying to
> send a NO CARRIER although GAtServer is removed.
> ---
>   src/emulator.c |    9 ++++++++-
>   1 files changed, 8 insertions(+), 1 deletions(-)
>
> diff --git a/src/emulator.c b/src/emulator.c
> index c3165eb..cbee6ad 100644
> --- a/src/emulator.c
> +++ b/src/emulator.c
> @@ -101,7 +101,14 @@ static void cleanup_ppp(struct ofono_emulator *em)
>   	em->pns_id = 0;
>
>   	g_at_server_resume(em->server);
> -	g_at_server_send_final(em->server, G_AT_SERVER_RESULT_NO_CARRIER);
> +
> +	/*
> +	 * If GAtServer IO is lost, GAtServer can have been removed
> +	 * through emulator disconnect routine.
> +	 */
> +	if (em->server != NULL)
> +		g_at_server_send_final(em->server,
> +					G_AT_SERVER_RESULT_NO_CARRIER);

If server is NULL then either it should be a global check like before 
(prior to proposed patch 1), or you should add a NULL check to 
g_at_server_send_final itself.

>   }
>
>   static void ppp_disconnect(GAtPPPDisconnectReason reason, gpointer user_data)

Regards,
-Denis

  reply	other threads:[~2012-06-22  7:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 14:19 [PATCH 1/2] emulator: Test already done in g_at_server_resume() Guillaume Zajac
2012-06-25 14:19 ` [PATCH 2/2] emulator: Fix crash when dundee is disconnecting Guillaume Zajac
2012-06-22  7:46   ` Denis Kenzior [this message]
2012-06-26  8:00     ` Guillaume Zajac

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=4FE422BC.3040507@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