mirror of https://github.com/PentHertz/srsLTE.git
rlc_am_lte: refactor logging when PDCP SDUs are enqueued
the patch refactor the logging when a new PDCP SDU is enqueued for transmission at RLC. If the SN is already present, only a warning is logged. From the RLC perspective operation continues and the SDU will be transmitted. The patch also changes the order of logs. When the SN cannot be inserted inside the queue of undelivered SDUs, only one message is logged.
This commit is contained in:
parent
358c4de0bd
commit
2cfc657fbb
|
@ -439,15 +439,14 @@ int rlc_am_lte::rlc_am_lte_tx::write_sdu(unique_byte_buffer_t sdu)
|
|||
return SRSLTE_ERROR;
|
||||
}
|
||||
|
||||
// Store SDU info
|
||||
logger.debug(
|
||||
"Storing PDCP SDU info in queue. PDCP_SN=%d, Queue Size=%ld", sdu_pdcp_sn, undelivered_sdu_info_queue.nof_sdus());
|
||||
|
||||
if (undelivered_sdu_info_queue.has_pdcp_sn(sdu_pdcp_sn)) {
|
||||
logger.error("PDCP SDU info already exists. SN=%d", sdu_pdcp_sn);
|
||||
logger.warning("PDCP_SN=%d already marked as undelivered", sdu_pdcp_sn);
|
||||
return SRSLTE_ERROR;
|
||||
}
|
||||
|
||||
// Store SDU info
|
||||
logger.debug("Marking PDCP_SN=%d as undelivered (queue_len=%ld)", sdu_pdcp_sn, undelivered_sdu_info_queue.nof_sdus());
|
||||
|
||||
undelivered_sdu_info_queue.add_pdcp_sdu(sdu_pdcp_sn);
|
||||
return SRSLTE_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue