diff --git a/src/device.c b/src/device.c
index ecd385c..e0ff0b1 100644
--- a/src/device.c
+++ b/src/device.c
struct btd_profile *profile,
GSList *uuids)
{
- if (profile->remote_uuid == NULL)
- return false;
+ GSList *l;
- /* Don't match if device was just discovered, is temporary, and the
- * profile don't have probe_on_discover flag set.
- */
- if (device->temporary && !profile->probe_on_discover)
+ if (profile->remote_uuid == NULL)
return false;
- if (g_slist_find_custom(uuids, profile->remote_uuid,
- bt_uuid_strcmp) == NULL)
+ l = g_slist_find_custom(uuids, profile->remote_uuid, bt_uuid_strcmp);
+ if (!l)
return false;
return true;
/* Only set auto connect if profile has set the flag and can really
* accept connections.
*/
- if (profile->auto_connect && profile->accept)
- device_set_auto_connect(device, TRUE);
+ if (profile->auto_connect && profile->accept) {
+ /* If temporary mark auto_connect as disabled so when the
+ * device is connected it attempts to enable it.
+ */
+ if (device->temporary)
+ device->disable_auto_connect = TRUE;
+ else
+ device_set_auto_connect(device, TRUE);
+ }
return service;
}
goto add_uuids;
}
- DBG("Probing profiles for device %s", addr);
-
btd_profile_foreach(dev_probe, &d);
add_uuids:
GSList *uuid_list;
char *new_uuid;
- if (g_slist_find_custom(device->uuids, uuid, bt_uuid_strcmp))
- return;
-
new_uuid = g_strdup(uuid);
uuid_list = g_slist_append(NULL, new_uuid);
g_free(new_uuid);
g_slist_free(uuid_list);
-
- store_device_info(device);
-
- g_dbus_emit_property_changed(dbus_conn, device->path,
- DEVICE_INTERFACE, "UUIDs");
}
static sdp_list_t *read_device_records(struct btd_device *device)
diff --git a/src/profile.h b/src/profile.h
index cfc5005..6871f2f 100644
--- a/src/profile.h
+++ b/src/profile.h
*/
bool experimental;
- /* Indicates the profile needs to be probed when the remote_uuid is
- * discovered.
- */
- bool probe_on_discover;
-
int (*device_probe) (struct btd_service *service);
void (*device_remove) (struct btd_service *service);