All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/2] gatppp: save dumpfile into ppp info to start recording during open phase.
Date: Fri, 05 Aug 2011 08:26:24 -0500	[thread overview]
Message-ID: <4E3BEF80.2040504@gmail.com> (raw)
In-Reply-To: <1312533244-28622-2-git-send-email-bertrand.aygon@intel.com>

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

Hi Bertrand,

On 08/05/2011 03:34 AM, Bertrand Aygon wrote:
> ---
>  gatchat/gatppp.c |   11 ++++++++++-
>  1 files changed, 10 insertions(+), 1 deletions(-)
> 
> diff --git a/gatchat/gatppp.c b/gatchat/gatppp.c
> index 2ff6c86..47a4949 100644
> --- a/gatchat/gatppp.c
> +++ b/gatchat/gatppp.c
> @@ -85,6 +85,7 @@ struct _GAtPPP {
>  	gboolean suspended;
>  	gboolean xmit_acfc;
>  	gboolean xmit_pfc;
> +	gchar *dumpfile;
>  };
>  
>  void ppp_debug(GAtPPP *ppp, const char *str)
> @@ -541,6 +542,8 @@ gboolean g_at_ppp_open(GAtPPP *ppp, GAtIO *io)
>  	if (ppp->hdlc == NULL)
>  		return FALSE;
>  
> +	g_at_hdlc_set_recording(ppp->hdlc, ppp->dumpfile);
> +
>  	ppp->suspended = FALSE;
>  	g_at_hdlc_set_receive(ppp->hdlc, ppp_receive, ppp);
>  	g_at_hdlc_set_suspend_function(ppp->hdlc,
> @@ -593,7 +596,11 @@ void g_at_ppp_set_recording(GAtPPP *ppp, const char *filename)
>  	if (ppp == NULL)
>  		return;
>  
> -	g_at_hdlc_set_recording(ppp->hdlc, filename);
> +	g_free(ppp->dumpfile);
> +
> +	ppp->dumpfile = g_strdup(filename);
> +
> +	g_at_hdlc_set_recording(ppp->hdlc, ppp->dumpfile);

I'm failing to see the point in making this change.  Why do you need to
save the dump filename inside gatppp?

>  }
>  
>  void g_at_ppp_set_connect_function(GAtPPP *ppp, GAtPPPConnectFunc func,
> @@ -745,6 +752,8 @@ void g_at_ppp_unref(GAtPPP *ppp)
>  
>  	g_at_hdlc_unref(ppp->hdlc);
>  
> +	g_free(ppp->dumpfile);
> +
>  	g_free(ppp);
>  }
>  

Regards,
-Denis

  reply	other threads:[~2011-08-05 13:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-05  8:34 [PATCH 0/2] PPP: recording ppp dump to file Bertrand Aygon
2011-08-05  8:34 ` [PATCH 1/2] gatppp: save dumpfile into ppp info to start recording during open phase Bertrand Aygon
2011-08-05 13:26   ` Denis Kenzior [this message]
2011-08-05 15:06     ` Aygon, Bertrand
2011-08-05 14:28       ` Denis Kenzior
2011-08-05 15:36         ` Aygon, Bertrand
2011-08-05 14:47           ` Denis Kenzior
2011-08-05 15:48             ` Aygon, Bertrand
2011-08-05  8:34 ` [PATCH 2/2] gprs: use a new var env to active PPP dump Bertrand Aygon

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=4E3BEF80.2040504@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.