Linux bluetooth development
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Giovanni Gherdovich <g.gherdovich@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 2/2] AVCTP: Replace calls to g_queue_free_full function
Date: Tue, 01 Jan 2013 17:19:51 -0800	[thread overview]
Message-ID: <1357089591.19248.90.camel@aeonflux> (raw)
In-Reply-To: <1357039308-8913-1-git-send-email-g.gherdovich@gmail.com>

Hi Giovanni,

> The function g_queue_free_full is available only from GLib 2.32.
> If BlueZ has to build against GLib 2.28, as stated in the configure.ac,
> this patch replaces the calls to g_queue_free_full in the AVTCP module
> with its body, taken from the sources of GLib 2.32.
> ---
>  profiles/audio/avctp.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
> index 013c587..745ced8 100644
> --- a/profiles/audio/avctp.c
> +++ b/profiles/audio/avctp.c
> @@ -395,7 +395,8 @@ static void avctp_channel_destroy(struct avctp_channel *chan)
>  		g_source_remove(chan->process_id);
>  
>  	g_free(chan->buffer);
> -	g_queue_free_full(chan->queue, pending_destroy);
> +	g_queue_foreach(chan->queue, (GFunc)pending_destroy, NULL);On Tue, 2013-01-01 at 12:21 +0100, Giovanni Gherdovich wrote:

Same here. Provide a proper pending_destroy. The other places can just
call it with NULL as second parameter.

> +	g_queue_free(chan->queue);
>  	g_slist_free_full(chan->processed, pending_destroy);
>  	g_slist_free_full(chan->handlers, g_free);
>  	g_free(chan);

Regards

Marcel



  reply	other threads:[~2013-01-02  1:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-01 11:21 [PATCH 2/2] AVCTP: Replace calls to g_queue_free_full function Giovanni Gherdovich
2013-01-02  1:19 ` Marcel Holtmann [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-01-02 21:32 Giovanni Gherdovich
2013-01-02 22:10 ` Marcel Holtmann
2013-01-03 19:37 Giovanni Gherdovich
2013-01-03 21:00 ` Marcel Holtmann

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=1357089591.19248.90.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=g.gherdovich@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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