From 3d244bfa4d88cab98825a7ebd9b1fe13ac5f7d77 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 9 Oct 2017 11:31:43 +0200 Subject: [PATCH] l2cap-ertm: fix compile --- src/l2cap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/l2cap.c b/src/l2cap.c index 317aa88f1..edc2fab91 100644 --- a/src/l2cap.c +++ b/src/l2cap.c @@ -625,7 +625,7 @@ static l2cap_ertm_tx_packet_state_t * l2cap_ertm_get_tx_state(l2cap_channel_t * // @param delta number of frames in the future, >= 1 // @assumption size <= l2cap_channel->local_mps (checked in l2cap_acl_classic_handler) -static void l2cap_ertm_handle_out_of_sequence_sdu(l2cap_channel_t * l2cap_channel, l2cap_segmentation_and_reassembly_t sar, int delta, uint8_t * payload, uint16_t size){ +static void l2cap_ertm_handle_out_of_sequence_sdu(l2cap_channel_t * l2cap_channel, l2cap_segmentation_and_reassembly_t sar, int delta, const uint8_t * payload, uint16_t size){ log_info("Store SDU with delta %u", delta); // get rx state for packet to store int index = l2cap_channel->rx_store_index + delta - 1; @@ -647,14 +647,14 @@ static void l2cap_ertm_handle_out_of_sequence_sdu(l2cap_channel_t * l2cap_channe } // @assumption size <= l2cap_channel->local_mps (checked in l2cap_acl_classic_handler) -static void l2cap_ertm_handle_in_sequence_sdu(l2cap_channel_t * l2cap_channel, l2cap_segmentation_and_reassembly_t sar, uint8_t * payload, uint16_t size){ +static void l2cap_ertm_handle_in_sequence_sdu(l2cap_channel_t * l2cap_channel, l2cap_segmentation_and_reassembly_t sar, const uint8_t * payload, uint16_t size){ uint16_t reassembly_sdu_length; switch (sar){ case L2CAP_SEGMENTATION_AND_REASSEMBLY_UNSEGMENTED_L2CAP_SDU: // assert total packet size <= our mtu if (size > l2cap_channel->local_mtu) break; // packet complete -> disapatch - l2cap_dispatch_to_channel(l2cap_channel, L2CAP_DATA_PACKET, payload, size); + l2cap_dispatch_to_channel(l2cap_channel, L2CAP_DATA_PACKET, (uint8_t*) payload, size); break; case L2CAP_SEGMENTATION_AND_REASSEMBLY_START_OF_L2CAP_SDU: // read SDU len