From: Johan Hedberg <johan.hedberg@gmail.com>
To: Szymon Janc <szymon.janc@tieto.com>
Cc: "Frédéric Danis" <frederic.danis@linux.intel.com>,
"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 11:07:58 +0200 [thread overview]
Message-ID: <20121031090758.GB20722@x220> (raw)
In-Reply-To: <14230948.4LRRcOUNYX@uw000953>
Hi Szymon,
On Wed, Oct 31, 2012, Szymon Janc wrote:
> > --- 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?
This was because of missing const declarations in the event.h API. I
fixed this up and removed the extra strdup from this patch.
Johan
next prev parent reply other threads:[~2012-10-31 9:07 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
2012-10-31 9:07 ` Johan Hedberg [this message]
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=20121031090758.GB20722@x220 \
--to=johan.hedberg@gmail.com \
--cc=frederic.danis@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@tieto.com \
/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).