linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: "João Paulo Rechi Vita" <jprvita@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ v4 01/15] core: Fix missing g_io_channel_ref
Date: Thu, 30 Aug 2012 16:34:51 -0700	[thread overview]
Message-ID: <20120830233451.GA972@x220.sheraton.com> (raw)
In-Reply-To: <1346364960-7699-2-git-send-email-jprvita@openbossa.org>

Hi João Paulo,

On Thu, Aug 30, 2012, João Paulo Rechi Vita wrote:
> ---
>  src/device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/device.c b/src/device.c
> index 3b44d9b..2c40ec2 100644
> --- a/src/device.c
> +++ b/src/device.c
> @@ -2027,7 +2027,7 @@ static gboolean att_connect(gpointer user_data)
>  		return FALSE;
>  	}
>  
> -	device->att_io = io;
> +	device->att_io = g_io_channel_ref(io);
>  
>  	return FALSE;
>  }

This doesn't look right to me. bt_io_connect returns a reference for the
caller and you shouldn't need to re-increment the ref count again unless
you store a pointer in multiple places (which you don't). If this patch
fixes some behavior the real bug must be somewhere else.

Johan

  reply	other threads:[~2012-08-30 23:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30 22:15 [PATCH BlueZ v4 00/15] LE General Connection Establishment procedure João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 01/15] core: Fix missing g_io_channel_ref João Paulo Rechi Vita
2012-08-30 23:34   ` Johan Hedberg [this message]
2012-09-03 18:16     ` Joao Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 02/15] core: Control connections based on adapter state João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 03/15] mgmt: Print error message when start_discovery fails João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 04/15] core: Add compare function for bdaddr in a struct btd_device João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 05/15] core: Add a list of LE devices to connect João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 06/15] core: Use adapter connect list for LE connections João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 07/15] core: Mutually exclude concurrent connections João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 08/15] mgmt: Add LE scanning callback João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 09/15] core: Replace interleaved by LE scanning João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 10/15] core: Start LE scanning when a device requests João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 11/15] core: Queue discovery if scanning is active João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 12/15] core: Disable unnecessary auto connections João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 13/15] core: Re-connect for ECONNRESET or ECONNABORTED João Paulo Rechi Vita
2012-08-30 22:15 ` [PATCH BlueZ v4 14/15] mgmt: Add address type to bonding debug message João Paulo Rechi Vita
2012-08-30 22:16 ` [PATCH BlueZ v4 15/15] core: Suspend scanning before connect on pairing João Paulo Rechi Vita

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=20120830233451.GA972@x220.sheraton.com \
    --to=johan.hedberg@gmail.com \
    --cc=jprvita@openbossa.org \
    --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;
as well as URLs for NNTP newsgroup(s).