summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2005-04-18 22:00:32 +0000
committerMarcel Holtmann <marcel@holtmann.org>2005-04-18 22:00:32 +0000
commitf1684dcb1badc1dfba7ad4133b8d6cac3e77c759 (patch)
tree2181779451906c3db11b136177dc35476796c4fd
parentfc64a954aa13eba73b3c24d20aac597576b0e840 (diff)
Support inquiry with unlimited number of responses
-rw-r--r--src/hci.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/hci.c b/src/hci.c
index e04e55a8..6e7fa987 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -577,11 +577,14 @@ int hci_devba(int dev_id, bdaddr_t *bdaddr)
int hci_inquiry(int dev_id, int len, int nrsp, const uint8_t *lap, inquiry_info **ii, long flags)
{
struct hci_inquiry_req *ir;
+ uint8_t num_rsp = nrsp;
void *buf;
int s, err;
- if (nrsp <= 0)
- nrsp = 200; /* enough ? */
+ if (nrsp <= 0) {
+ num_rsp = 0;
+ nrsp = 255;
+ }
if (dev_id < 0 && (dev_id = hci_get_route(NULL)) < 0) {
errno = ENODEV;
@@ -600,7 +603,7 @@ int hci_inquiry(int dev_id, int len, int nrsp, const uint8_t *lap, inquiry_info
ir = buf;
ir->dev_id = dev_id;
- ir->num_rsp = nrsp;
+ ir->num_rsp = num_rsp;
ir->length = len;
ir->flags = flags;