Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB
Date: Thu, 19 May 2011 11:11:33 -0500	[thread overview]
Message-ID: <4DD54135.7070709@gmail.com> (raw)
In-Reply-To: <1305810194-24360-1-git-send-email-guillaume.zajac@linux.intel.com>

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

Hi Guillaume,

On 05/19/2011 08:03 AM, Guillaume Zajac wrote:
> ---
>  src/emulator.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/emulator.c b/src/emulator.c
> index c17b901..251bed8 100644
> --- a/src/emulator.c
> +++ b/src/emulator.c
> @@ -219,15 +219,19 @@ static void dun_ath_cb(GAtServer *server, GAtServerRequestType type,
>  		if (val != 0)
>  			goto error;
>  
> +		g_at_server_suspend(em->server);
>  		g_at_ppp_unref(em->ppp);
>  		em->ppp = NULL;
> +		g_at_server_resume(em->server);
>  
>  		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>  		break;
>  
>  	case G_AT_SERVER_REQUEST_TYPE_COMMAND_ONLY:
> +		g_at_server_suspend(em->server);
>  		g_at_ppp_unref(em->ppp);
>  		em->ppp = NULL;
> +		g_at_server_resume(em->server);
>  
>  		g_at_server_send_final(server, G_AT_SERVER_RESULT_OK);
>  		break;

This really sounds wrong.  I suggest that we not set the disconnect
function in GAtPPP when unrefing if GAtPPP is currently suspended.

Regards,
-Denis

  reply	other threads:[~2011-05-19 16:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 13:03 [PATCH] emulator: fix dun_ath_cb() not to remove GAtServer io_disconnect() CB Guillaume Zajac
2011-05-19 16:11 ` Denis Kenzior [this message]
2011-05-20  8:29   ` Guillaume Zajac
2011-05-20  9:40   ` 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=4DD54135.7070709@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