Linux bluetooth development
 help / color / mirror / Atom feed
From: Andrei Emeltchenko <Andrei.Emeltchenko.news@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH] android/daemon: Implement get adapter name
Date: Mon,  4 Nov 2013 11:39:12 +0200	[thread overview]
Message-ID: <1383557952-9302-1-git-send-email-Andrei.Emeltchenko.news@gmail.com> (raw)
In-Reply-To: <1383556934-5481-1-git-send-email-Andrei.Emeltchenko.news@gmail.com>

From: Andrei Emeltchenko <andrei.emeltchenko@intel.com>

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

diff --git a/android/adapter.c b/android/adapter.c
index cb92f2f..55c495c 100644
--- a/android/adapter.c
+++ b/android/adapter.c
@@ -71,6 +71,8 @@ static void mgmt_local_name_changed_event(uint16_t index, uint16_t length,
 {
 	const struct mgmt_cp_set_local_name *rp = param;
 
+	DBG("");
+
 	if (length < sizeof(*rp)) {
 		error("Wrong size of local name changed parameters");
 		return;
@@ -1016,13 +1018,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(adapter->name);
 
-	return false;
+	return true;
 }
 
 static bool get_uuids(void)
@@ -1097,7 +1100,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


  parent reply	other threads:[~2013-11-04  9:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-04  9:22 [RFC] android/daemon: Implement get adapter name Andrei Emeltchenko
2013-11-04  9:34 ` Andrei Emeltchenko
2013-11-04  9:39 ` Andrei Emeltchenko [this message]
2013-11-04 10:14   ` [PATCH] " Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383557952-9302-1-git-send-email-Andrei.Emeltchenko.news@gmail.com \
    --to=andrei.emeltchenko.news@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox