diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2007-10-25 23:03:55 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2007-10-25 23:03:55 +0000 |
commit | d1a192c601d9e0e0f4f0da13fadccb50904c5004 (patch) | |
tree | f46f4bd8579c158edea7241b34e7e41ff8acf3f2 /src | |
parent | f35f7aa9aacf6cba18949d927f279475c7ca1571 (diff) |
Fix remote name request event handling
Diffstat (limited to 'src')
-rw-r--r-- | src/hci.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -1009,7 +1009,9 @@ int hci_send_req(int dd, struct hci_request *r, int to) try = 10; while (try--) { evt_cmd_complete *cc; - evt_cmd_status *cs; + evt_cmd_status *cs; + evt_remote_name_req_complete *rn; + remote_name_req_cp *cp; if (to) { struct pollfd p; @@ -1074,6 +1076,20 @@ int hci_send_req(int dd, struct hci_request *r, int to) memcpy(r->rparam, ptr, r->rlen); goto done; + case EVT_REMOTE_NAME_REQ_COMPLETE: + if (hdr->evt != r->event) + break; + + rn = r->rparam; + cp = r->cparam; + + if (bacmp(&rn->bdaddr, &cp->bdaddr)) + continue; + + r->rlen = MIN(len, r->rlen); + memcpy(r->rparam, ptr, r->rlen); + goto done; + default: if (hdr->evt != r->event) break; |