From 53d2220aab23b9425039c3cf0a0c5501496229e1 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 18 Jun 2019 12:42:53 +0100 Subject: [PATCH] Resolved conflicts with unique pointers after rebase in PDCP entity. --- lib/include/srslte/upper/pdcp_entity.h | 4 ++-- lib/src/upper/pdcp_entity.cc | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/include/srslte/upper/pdcp_entity.h b/lib/include/srslte/upper/pdcp_entity.h index 590c2cb7b..ec133b190 100644 --- a/lib/include/srslte/upper/pdcp_entity.h +++ b/lib/include/srslte/upper/pdcp_entity.h @@ -119,8 +119,8 @@ private: pthread_mutex_t mutex; - void handle_um_drb_pdu(srslte::byte_buffer_t *pdu); - void handle_am_drb_pdu(srslte::byte_buffer_t *pdu); + void handle_um_drb_pdu(const srslte::unique_byte_buffer_t& pdu); + void handle_am_drb_pdu(const srslte::unique_byte_buffer_t& pdu); void integrity_generate(uint8_t *msg, uint32_t msg_len, diff --git a/lib/src/upper/pdcp_entity.cc b/lib/src/upper/pdcp_entity.cc index 29997ddd1..d2dbf5e52 100644 --- a/lib/src/upper/pdcp_entity.cc +++ b/lib/src/upper/pdcp_entity.cc @@ -221,7 +221,7 @@ void pdcp_entity::write_pdu(unique_byte_buffer_t pdu) } else { handle_am_drb_pdu(pdu); } - gw->write_pdu(lcid, pdu); + gw->write_pdu(lcid, std::move(pdu)); } else { // Handle SRB messages if (cfg.is_control) { @@ -260,13 +260,13 @@ exit: * Ref: 3GPP TS 36.323 v10.1.0 Section 5.1.2 ***************************************************************************/ // DRBs mapped on RLC UM (5.1.2.1.3) -void pdcp_entity::handle_um_drb_pdu(srslte::byte_buffer_t* pdu) +void pdcp_entity::handle_um_drb_pdu(const srslte::unique_byte_buffer_t &pdu) { uint32_t sn; if (12 == cfg.sn_len) { - pdcp_unpack_data_pdu_long_sn(pdu, &sn); + pdcp_unpack_data_pdu_long_sn(pdu.get(), &sn); } else { - pdcp_unpack_data_pdu_short_sn(pdu, &sn); + pdcp_unpack_data_pdu_short_sn(pdu.get(), &sn); } if (sn < next_pdcp_rx_sn) { @@ -290,10 +290,10 @@ void pdcp_entity::handle_um_drb_pdu(srslte::byte_buffer_t* pdu) } // DRBs mapped on RLC AM, without re-ordering (5.1.2.1.2) -void pdcp_entity::handle_am_drb_pdu(srslte::byte_buffer_t* pdu) +void pdcp_entity::handle_am_drb_pdu(const srslte::unique_byte_buffer_t &pdu) { uint32_t sn, count; - pdcp_unpack_data_pdu_long_sn(pdu, &sn); + pdcp_unpack_data_pdu_long_sn(pdu.get(), &sn); int32_t last_submit_diff_sn = last_submitted_pdcp_rx_sn - sn; int32_t sn_diff_last_submit = sn - last_submitted_pdcp_rx_sn;