[PATCHv2 1/2] android/daemon: Implement get adapter name

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

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

---
 android/adapter.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/android/adapter.c b/android/adapter.c
index af461b8..fdac82e 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -1017,13 +1017,14 @@ static void send_adapter_address(void)
 	g_free(ev);
 }
 
-static bool get_name(void)
+static bool send_adapter_name(void)
 {
-	DBG("Not implemented");
+	if (!adapter->name)
+		return false;
 
-	/* TODO: Add implementation */
+	adapter_name_changed((uint8_t *) adapter->name);
 
-	return false;
+	return true;
 }
 
 static bool get_uuids(void)
@@ -1098,7 +1099,7 @@ static bool get_property(void *buf, uint16_t len)
 		send_adapter_address();
 		return true;
 	case HAL_PROP_ADAPTER_NAME:
-		return get_name();
+		return send_adapter_name();
 	case HAL_PROP_ADAPTER_UUIDS:
 		return get_uuids();
 	case HAL_PROP_ADAPTER_CLASS:
-- 
1.7.10.4

--
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