summaryrefslogtreecommitdiff
path: root/profiles/scanparam
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2013-07-29 09:59:28 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2013-07-30 12:50:26 +0300
commit9a3b7a8dd865a9b50d5894a49542286e357230c1 (patch)
treec2fb6ec8032df2ccfff9d635295e301cd7477e39 /profiles/scanparam
parente7d82756766da085990c39de3fd3330075554df0 (diff)
downloadbluez-9a3b7a8dd865a9b50d5894a49542286e357230c1.tar.gz
scanparam: Fix handle range check on descriptor discovery
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.
Diffstat (limited to 'profiles/scanparam')
-rw-r--r--profiles/scanparam/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/profiles/scanparam/scan.c b/profiles/scanparam/scan.c
index f5db5edc3..0ad2e1781 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;