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 v3 04/14] core: Add a list of LE devices to connect
Date: Fri, 17 Aug 2012 10:42:08 +0300	[thread overview]
Message-ID: <20120817074208.GB30060@x220> (raw)
In-Reply-To: <1345152524-13404-5-git-send-email-jprvita@openbossa.org>

Hi,

On Thu, Aug 16, 2012, João Paulo Rechi Vita wrote:
> +void adapter_connect_list_add(struct btd_adapter *adapter,
> +					struct btd_device *device)
> +{
> +	if (g_slist_find(adapter->connect_list, device)) {
> +		DBG("trying to add device %s which is already in the connect "
> +				"list, ignoring", device_get_path(device));
> +		return;
> +	}

If possible could you try to avoid split message strings. Since the
context (function name, line number) is anyway logged with DBG you could
just have e.g. "ignoring already added device %s"

> +	adapter->connect_list = g_slist_append(adapter->connect_list, device);

Looks like there's a missing btd_device_ref here.

> +void adapter_connect_list_remove(struct btd_adapter *adapter,
> +					struct btd_device *device)
> +{
> +	adapter->connect_list = g_slist_remove(adapter->connect_list, device);

And a missing btd_device_unref here.

Johan

  reply	other threads:[~2012-08-17  7:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 21:28 [PATCH BlueZ v3 00/14] LE General Connection Establishment procedure João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 01/14] core: Control connections based on adapter state João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 02/14] mgmt: print error message when start_discovery fails João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 03/14] core: add compare function for bdaddr in a struct btd_device João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 04/14] core: Add a list of LE devices to connect João Paulo Rechi Vita
2012-08-17  7:42   ` Johan Hedberg [this message]
2012-08-16 21:28 ` [PATCH BlueZ v3 05/14] core: use adapter connect list for LE connections João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 06/14] core: mutually exclude concurrent connections João Paulo Rechi Vita
2012-08-17  7:51   ` Johan Hedberg
2012-08-30 22:08     ` Joao Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 07/14] mgmt: Add LE scanning callback João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 08/14] core: Replace interleaved by LE scanning João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 09/14] core: Start LE scanning when a device requests João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 10/14] core: Remove leftover define João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 11/14] core: Queue discovery if scanning is active João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 12/14] test: Fix exiting the bus when a discovery session ends João Paulo Rechi Vita
2012-08-16 21:28 ` [PATCH BlueZ v3 13/14] core: Disable unnecessary auto connections João Paulo Rechi Vita
2012-08-17  7:39   ` Johan Hedberg
2012-08-16 21:28 ` [PATCH BlueZ v3 14/14] core: Re-connect for ECONNRESET or ECONNABORTED 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=20120817074208.GB30060@x220 \
    --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).