diff options
Diffstat (limited to 'src/hci.c')
-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; |