}
}
+static struct gatt_client_info_t *_bt_find_remote_gatt_client_info_with_inst_id(char *address, int instance_id)
+{
+ GSList *l;
+ struct gatt_client_info_t *info = NULL;
+ for (l = gatt_client_info_list; l != NULL; l = g_slist_next(l)) {
+ info = (struct gatt_client_info_t*)l->data;
+ if (info == NULL)
+ continue;
+
+ if (!g_strcmp0(info->addr, address)) {
+ if (info->instance_id == instance_id) {
+ BT_DBG("Remote GATT client found addr[%s] instance_id[%d]", info->addr, info->instance_id);
+ return info;
+ }
+ }
+ }
+ return NULL;
+}
+
struct gatt_client_info_t *_bt_find_remote_gatt_client_info(char *address)
{
GSList *l;
}
} else {
- conn = _bt_find_remote_gatt_client_info(address);
+ conn = _bt_find_remote_gatt_client_info_with_inst_id(address, param->instance_id);
if (conn) {
ret = gatts_send_indication(param->instance_id, param->atrribute_handle,
conn->connection_id, data->length,