diff --git a/lib/include/srslte/interfaces/ue_interfaces.h b/lib/include/srslte/interfaces/ue_interfaces.h index 11c517d34..de4806c7b 100644 --- a/lib/include/srslte/interfaces/ue_interfaces.h +++ b/lib/include/srslte/interfaces/ue_interfaces.h @@ -220,6 +220,7 @@ class rrc_interface_rlc public: virtual void max_retx_attempted() = 0; virtual std::string get_rb_name(uint32_t lcid) = 0; + virtual void write_pdu(uint32_t lcid, srslte::unique_byte_buffer_t pdu) = 0; }; @@ -284,6 +285,7 @@ public: virtual void change_lcid(uint32_t old_lcid, uint32_t new_lcid) = 0; virtual bool has_bearer(uint32_t lcid) = 0; virtual bool has_data(const uint32_t lcid) = 0; + virtual void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking = true) = 0; }; // RLC interface for PDCP diff --git a/lib/src/upper/rlc_tm.cc b/lib/src/upper/rlc_tm.cc index e298f01aa..c2eaad7b0 100644 --- a/lib/src/upper/rlc_tm.cc +++ b/lib/src/upper/rlc_tm.cc @@ -183,7 +183,11 @@ void rlc_tm::write_pdu(uint8_t *payload, uint32_t nof_bytes) buf->N_bytes = nof_bytes; buf->set_timestamp(); num_rx_bytes += nof_bytes; - pdcp->write_pdu(lcid, std::move(buf)); + if (rrc->get_rb_name(lcid) == "SRB0") { + rrc->write_pdu(lcid, std::move(buf)); + } else { + pdcp->write_pdu(lcid, std::move(buf)); + } } else { log->error("Fatal Error: Couldn't allocate buffer in rlc_tm::write_pdu().\n"); } diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 60519337f..6df1f7f31 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -2153,7 +2153,7 @@ void rrc::send_ul_ccch_msg(const asn1::rrc::ul_ccch_msg_s& msg) uint32_t lcid = RB_ID_SRB0; log_rrc_message(get_rb_name(lcid).c_str(), Tx, pdcp_buf.get(), msg); - pdcp->write_sdu(lcid, std::move(pdcp_buf)); + rlc->write_sdu(lcid, std::move(pdcp_buf)); } void rrc::send_ul_dcch_msg(uint32_t lcid, const asn1::rrc::ul_dcch_msg_s& msg)