mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Reset l2cap states at new connection request
This commit is contained in:
parent
5a2faf3855
commit
acf47a683d
2 changed files with 3 additions and 0 deletions
|
@ -238,6 +238,7 @@ void PS3BT::ACLData(uint8_t* ACLData) {
|
|||
if(((ACLData[12] | (ACLData[13] << 8)) == HID_CTRL_PSM) || ((ACLData[12] | (ACLData[13] << 8)) == HID_INTR_PSM)) {
|
||||
pBtd->claimConnection(); // Claim that the incoming connection belongs to this service
|
||||
hci_handle = pBtd->hci_handle; // Store the HCI Handle for the connection
|
||||
l2cap_state = L2CAP_EV_WAIT;
|
||||
for(uint8_t i = 0; i < 30; i++)
|
||||
remote_name[i] = pBtd->remote_name[i]; // Store the remote name for the connection
|
||||
#ifdef DEBUG
|
||||
|
|
2
SPP.cpp
2
SPP.cpp
|
@ -83,6 +83,8 @@ void SPP::ACLData(uint8_t* l2capinbuf) {
|
|||
if(((l2capinbuf[12] | (l2capinbuf[13] << 8)) == SDP_PSM) || ((l2capinbuf[12] | (l2capinbuf[13] << 8)) == RFCOMM_PSM)) {
|
||||
pBtd->claimConnection(); // Claim that the incoming connection belongs to this service
|
||||
hci_handle = pBtd->hci_handle; // Store the HCI Handle for the connection
|
||||
l2cap_sdp_state = L2CAP_SDP_WAIT; // Reset state
|
||||
l2cap_rfcomm_state = L2CAP_RFCOMM_WAIT; // Reset state
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue