mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-04 04:20:58 +00:00
extract con_handle from L2CAP_EVENT_INCOMING_CONNECTION
This commit is contained in:
parent
f13263b945
commit
971a59f032
@ -619,9 +619,12 @@ static int rfcomm_multiplexer_hci_event_handler(uint8_t *packet, uint16_t size){
|
|||||||
case L2CAP_EVENT_INCOMING_CONNECTION:
|
case L2CAP_EVENT_INCOMING_CONNECTION:
|
||||||
// data: event(8), len(8), address(48), handle (16), psm (16), source cid(16) dest cid(16)
|
// data: event(8), len(8), address(48), handle (16), psm (16), source cid(16) dest cid(16)
|
||||||
bt_flip_addr(event_addr, &packet[2]);
|
bt_flip_addr(event_addr, &packet[2]);
|
||||||
|
con_handle = READ_BT_16(packet, 8);
|
||||||
psm = READ_BT_16(packet, 10);
|
psm = READ_BT_16(packet, 10);
|
||||||
if (psm != PSM_RFCOMM) break;
|
|
||||||
l2cap_cid = READ_BT_16(packet, 12);
|
l2cap_cid = READ_BT_16(packet, 12);
|
||||||
|
|
||||||
|
if (psm != PSM_RFCOMM) break;
|
||||||
|
|
||||||
multiplexer = rfcomm_multiplexer_for_addr(&event_addr);
|
multiplexer = rfcomm_multiplexer_for_addr(&event_addr);
|
||||||
|
|
||||||
if (multiplexer) {
|
if (multiplexer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user