The eir_uuids list contains GATT service UUIDs from advertising data.
The device may advertise different UUIDs each time it is scanned and
connected, so the list needs to be cleared when the device disconnects.
This partially fixes an issue where the UUIDs D-Bus property is empty
after scanning, connecting, disconnecting and scanning again when
[GATT] Cache = yes is set in main.conf.
Issue: https://github.com/bluez/bluez/issues/192
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
device_update_last_seen(device, bdaddr_type);
+ g_slist_free_full(device->eir_uuids, g_free);
+ device->eir_uuids = NULL;
+
g_dbus_emit_property_changed(dbus_conn, device->path,
DEVICE_INTERFACE, "Connected");