diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-04-18 22:00:32 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-04-18 22:00:32 +0000 |
commit | f1684dcb1badc1dfba7ad4133b8d6cac3e77c759 (patch) | |
tree | 2181779451906c3db11b136177dc35476796c4fd | |
parent | fc64a954aa13eba73b3c24d20aac597576b0e840 (diff) |
Support inquiry with unlimited number of responses
-rw-r--r-- | src/hci.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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; |