diff --git a/src/device.c b/src/device.c
index 8184508..5ec8780 100644
--- a/src/device.c
+++ b/src/device.c
if (!dev->temporary)
store_device_info(dev);
- if (bdaddr_type != BDADDR_BREDR && err == 0) {
+ if (bdaddr_type != BDADDR_BREDR && err == 0)
store_services(dev);
- store_gatt_db(dev);
- }
if (!req)
return;
{
struct btd_device *device = user_data;
+ store_gatt_db(device);
+
g_dbus_emit_property_changed(dbus_conn, device->path, DEVICE_INTERFACE,
"GattServices");
* request
*/
if (state->svc_resolved && bonding) {
+ /* Attept to store services for this device failed because it
+ * was not paired. Now that we're paired retry. */
+ store_gatt_db(device);
+
g_dbus_send_reply(dbus_conn, bonding->msg, DBUS_TYPE_INVALID);
bonding_request_free(bonding);
return;