linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH BlueZ v2] core/device: Fix breakage of Bluetooth pairing
Date: Tue, 12 Apr 2016 00:24:29 +0300	[thread overview]
Message-ID: <CABBYNZ+9x5cusajZzk-BD59d=5gYeqPz6XuDL2ouVURRpc8Gpg@mail.gmail.com> (raw)
In-Reply-To: <20160411190614.GA4001@t440s.P-661HNU-F1>

Hi Johan,

On Mon, Apr 11, 2016 at 10:06 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi Luiz,
>
> On Mon, Apr 11, 2016, Luiz Augusto von Dentz wrote:
>> +static void convert_info(struct btd_device *device, GKeyFile *key_file)
>> +{
>> +     char **uuids;
>> +
>> +     /* Load device profile list from legacy property */
>> +     uuids = g_key_file_get_string_list(key_file, "General", "SDPServices",
>> +                                                             NULL, NULL);
>> +     if (uuids) {
>> +             char **uuid;
>> +
>> +             for (uuid = uuids; *uuid; uuid++)
>> +                     device_add_uuid(device, *uuid);
>> +
>> +             /* Remove SDPServices so it is not loaded again */
>> +             g_key_file_remove_key(key_file, "General", "SDPServices", NULL);
>
> Note that this doesn't modify the file but just the GKeyFile object. For
> places where we need to write back out the contents to the file we
> usually use g_key_file_to_data + g_file_set_contents, but I didn't see
> any such calls in this call path.

Good catch I forgot that is actually not saved automatically.

-- 
Luiz Augusto von Dentz

      reply	other threads:[~2016-04-11 21:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11 16:03 [PATCH BlueZ v2] core/device: Fix breakage of Bluetooth pairing Luiz Augusto von Dentz
2016-04-11 19:06 ` Johan Hedberg
2016-04-11 21:24   ` Luiz Augusto von Dentz [this message]

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='CABBYNZ+9x5cusajZzk-BD59d=5gYeqPz6XuDL2ouVURRpc8Gpg@mail.gmail.com' \
    --to=luiz.dentz@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;
as well as URLs for NNTP newsgroup(s).