Re: [PATCH BlueZ v2] core/device: Fix breakage of Bluetooth pairing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Mon, Apr 11, 2016 at 10:06 PM, Johan Hedberg <johan.hedberg@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux