[PATCH BlueZ 5/5] Check if attrib server is enabled for Proximity

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

 



From: Claudio Takahasi <claudio.takahasi@xxxxxxxxxxxxx>

Before registering Proximity services(Link Loss, Immediate alert and
TX Power), "AttributeServer" option value needs to be verified.
---
 proximity/reporter.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/proximity/reporter.c b/proximity/reporter.c
index fe18442..77a7dcd 100644
--- a/proximity/reporter.c
+++ b/proximity/reporter.c
@@ -31,6 +31,7 @@
 
 #include "log.h"
 
+#include "hcid.h"
 #include "att.h"
 #include "gattrib.h"
 #include "attrib-server.h"
@@ -170,10 +171,10 @@ static void register_immediate_alert(void)
 
 int reporter_init(void)
 {
-	/*
-	 * TODO: Create/Update Proximity Reporter Characteristics
-	 * for Path Loss and Immediate Alert Services.
-	 */
+	if (!main_opts.attrib_server) {
+		DBG("Attribute server is disabled");
+		return -1;
+	}
 
 	DBG("Proximity Reporter");
 
-- 
1.7.0.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