diff options
Diffstat (limited to 'hcid/adapter.c')
| -rw-r--r-- | hcid/adapter.c | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c index 83a575b6..2cd526e2 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -3235,6 +3235,7 @@ static void discover_services_cb(gpointer user_data, sdp_list_t *recs, int err)  	DBusMessage *reply;  	GSList *uuids;  	const char *path; +	bdaddr_t src, dst;  	if (err < 0) {  		error_connection_attempt_failed(adapter->create->conn, @@ -3267,6 +3268,7 @@ static void discover_services_cb(gpointer user_data, sdp_list_t *recs, int err)  	if (!path)  		goto failed; +	/* Reply create device request */  	reply = dbus_message_new_method_return(adapter->create->msg);  	if (!reply)  		goto failed; @@ -3277,6 +3279,16 @@ static void discover_services_cb(gpointer user_data, sdp_list_t *recs, int err)  	adapter->devices = g_slist_append(adapter->devices, g_strdup(path)); +	/* Store the device's profiles in the filesystem */ +	str2ba(adapter->address, &src); +	str2ba(adapter->create->address, &dst); +	if (uuids) { +		char *str = bt_list2string(uuids); +		write_device_profiles(&src, &dst, str); +		g_free(str); +	} else +		write_device_profiles(&src, &dst, ""); +  failed:  	dbus_connection_unref(adapter->create->conn);  	dbus_message_unref(adapter->create->msg);  | 
