Change-Id: I275000a51c92aebfed484019238d7666e961312b
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
gatt_client_cleanup(device);
return;
}
-
- device->gatt_cache_used = !gatt_db_isempty(device->db);
-
- btd_gatt_client_connected(device->client_dbus);
}
static void gatt_server_init(struct btd_device *device, struct gatt_db *db)
void btd_gatt_client_ready(struct btd_gatt_client *client)
{
+ struct bt_gatt_client *gatt;
+
if (!client)
return;
- if (!client->gatt) {
+ gatt = btd_device_get_gatt_client(client->device);
+ if (!gatt) {
error("GATT client not initialized");
return;
}
+ bt_gatt_client_unref(client->gatt);
+ client->gatt = bt_gatt_client_ref(gatt);
client->ready = true;
DBG("GATT client ready");