[PATCH BlueZ 1/5] scanparam: Fix handle range check on descriptor discovery

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

 



When discovering descriptors, if there is only a single descriptor, the
start handle will be equal to the end handle. It is valid to issue the
Find Information Request on this case.

Before this fix, notification for Scan Refresh characteristic was never
enabled.
---
 profiles/scanparam/scan.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/profiles/scanparam/scan.c b/profiles/scanparam/scan.c
index f5db5ed..0ad2e17 100644
--- a/profiles/scanparam/scan.c
+++ b/profiles/scanparam/scan.c
@@ -158,7 +158,7 @@ static void refresh_discovered_cb(GSList *chars, guint8 status,
 	start = chr->value_handle + 1;
 	end = scan->range.end;
 
-	if (start >= end)
+	if (start > end)
 		return;
 
 	scan->refresh_handle = chr->value_handle;
-- 
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