[PATCH v10 4/6] dbusoob: Set device name in device object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 plugins/dbusoob.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/plugins/dbusoob.c b/plugins/dbusoob.c
index 5c5b6ef..0278941 100644
--- a/plugins/dbusoob.c
+++ b/plugins/dbusoob.c
@@ -193,6 +193,7 @@ static gboolean parse_data(DBusMessageIter *data, struct oob_data *remote_data)
 
 static gboolean store_data(struct btd_adapter *adapter, struct oob_data *data)
 {
+	bdaddr_t local = *adapter_get_address(adapter);
 	bdaddr_t bdaddr;
 
 	str2ba(data->addr, &bdaddr);
@@ -207,9 +208,13 @@ static gboolean store_data(struct btd_adapter *adapter, struct oob_data *data)
 		write_remote_class(adapter_get_address(adapter), &bdaddr,
 								data->class);
 
-	if (data->name)
-		write_device_name(adapter_get_address(adapter), &bdaddr, 0,
-								data->name);
+	if (data->name) {
+		char *str;
+
+		str = g_strdup(data->name);
+		btd_event_remote_name(&local, &bdaddr, str);
+		g_free(str);
+	}
 
 	return TRUE;
 }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux