void device_add_eir_uuids(struct btd_device *dev, GSList *uuids)
{
GSList *l;
- bool added = false;
+ GSList *added = NULL;
if (dev->bredr_state.svc_resolved || dev->le_state.svc_resolved)
return;
const char *str = l->data;
if (g_slist_find_custom(dev->eir_uuids, str, bt_uuid_strcmp))
continue;
- added = true;
+ added = g_slist_append(added, (void *)str);
dev->eir_uuids = g_slist_append(dev->eir_uuids, g_strdup(str));
}
- if (added)
- g_dbus_emit_property_changed(dbus_conn, dev->path,
- DEVICE_INTERFACE, "UUIDs");
+ device_probe_profiles(dev, added);
}
static void add_manufacturer_data(void *data, void *user_data)
struct eir_sd *sd = data;
struct btd_device *dev = user_data;
bt_uuid_t uuid;
+ GSList *l;
if (bt_string_to_uuid(&uuid, sd->uuid) < 0)
return;
if (!bt_ad_add_service_data(dev->ad, &uuid, sd->data, sd->data_len))
return;
+ l = g_slist_append(NULL, sd->uuid);
+ device_add_eir_uuids(dev, l);
+ g_slist_free(l);
+
g_dbus_emit_property_changed(dbus_conn, dev->path,
DEVICE_INTERFACE, "ServiceData");
}
if (profile->remote_uuid == NULL)
return false;
+ /* Don't match if device was just discovered (not connected) and the
+ * profile don't have probe_on_discover flag set.
+ */
+ if (!btd_device_is_connected(device) && !profile->probe_on_discover)
+ return false;
+
if (g_slist_find_custom(uuids, profile->remote_uuid,
bt_uuid_strcmp) == NULL) {
#ifdef TIZEN_BT_HID_DEVICE_ENABLE
struct probe_data d = { device, uuids };
char addr[18];
+ if (!uuids)
+ return;
+
ba2str(&device->bdaddr, addr);
if (device->blocked) {