From: Szymon Janc <szymon.janc@tieto.com>
To: "Frédéric Danis" <frederic.danis@linux.intel.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v10 4/6] dbusoob: Set device name in device object
Date: Wed, 31 Oct 2012 08:22:04 +0100 [thread overview]
Message-ID: <14230948.4LRRcOUNYX@uw000953> (raw)
In-Reply-To: <1351616728-10075-4-git-send-email-frederic.danis@linux.intel.com>
Hi Frédéric,
On Tuesday 30 of October 2012 19:05:26 Frédéric Danis wrote:
> ---
> plugins/dbusoob.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c
> index 5c5b6ef..0278941 100644
> --- a/plugins/dbusoob.c
> +++ b/plugins/dbusoob.c
> @@ -193,6 +193,7 @@ static gboolean parse_data(DBusMessageIter *data, struct oob_data *remote_data)
>
> static gboolean store_data(struct btd_adapter *adapter, struct oob_data *data)
> {
> + bdaddr_t local = *adapter_get_address(adapter);
> bdaddr_t bdaddr;
>
> str2ba(data->addr, &bdaddr);
> @@ -207,9 +208,13 @@ static gboolean store_data(struct btd_adapter *adapter, struct oob_data *data)
> write_remote_class(adapter_get_address(adapter), &bdaddr,
> data->class);
>
> - if (data->name)
> - write_device_name(adapter_get_address(adapter), &bdaddr, 0,
> - data->name);
> + if (data->name) {
> + char *str;
> +
> + str = g_strdup(data->name);
> + btd_event_remote_name(&local, &bdaddr, str);
> + g_free(str);
Is this g_strdup needed? Why not just pass data->name directly?
> + }
>
> return TRUE;
> }
> --
> 1.7.9.5
>
--
BR
Szymon Janc
next prev parent reply other threads:[~2012-10-31 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 17:05 [PATCH v10 1/6] adapter: Simplify cached name storage Frédéric Danis
2012-10-30 17:05 ` [PATCH v10 2/6] doc: Update settings-storage.txt Frédéric Danis
2012-10-30 17:05 ` [PATCH v10 3/6] device: Retrieve name from storage Frédéric Danis
2012-10-30 17:05 ` [PATCH v10 4/6] dbusoob: Set device name in device object Frédéric Danis
2012-10-31 7:22 ` Szymon Janc [this message]
2012-10-31 9:07 ` Johan Hedberg
2012-10-30 17:05 ` [PATCH v10 5/6] input: Retrieve device name from " Frédéric Danis
2012-10-30 17:05 ` [PATCH v10 6/6] hcitool: Retrieve names from cache directory Frédéric Danis
2012-10-31 9:07 ` [PATCH v10 1/6] adapter: Simplify cached name storage Johan Hedberg
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=14230948.4LRRcOUNYX@uw000953 \
--to=szymon.janc@tieto.com \
--cc=frederic.danis@linux.intel.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;
as well as URLs for NNTP newsgroup(s).