rlc_am: fix newline in logs

master
Andre Puschmann 6 years ago
parent b903e61548
commit acf95fdd85

@ -361,7 +361,12 @@ void rlc_am::rlc_am_tx::write_sdu(unique_byte_buffer_t sdu, bool blocking)
if (sdu.get() != NULL) { if (sdu.get() != NULL) {
if (blocking) { if (blocking) {
// block on write to queue // block on write to queue
log->info_hex(sdu->msg, sdu->N_bytes, "%s Tx SDU (%d B, tx_sdu_queue_len=%d)", RB_NAME, sdu->N_bytes, tx_sdu_queue.size()); log->info_hex(sdu->msg,
sdu->N_bytes,
"%s Tx SDU (%d B, tx_sdu_queue_len=%d)\n",
RB_NAME,
sdu->N_bytes,
tx_sdu_queue.size());
tx_sdu_queue.write(std::move(sdu)); tx_sdu_queue.write(std::move(sdu));
} else { } else {
// non-blocking write // non-blocking write
@ -370,13 +375,12 @@ void rlc_am::rlc_am_tx::write_sdu(unique_byte_buffer_t sdu, bool blocking)
std::pair<bool, unique_byte_buffer_t> ret = tx_sdu_queue.try_write(std::move(sdu)); std::pair<bool, unique_byte_buffer_t> ret = tx_sdu_queue.try_write(std::move(sdu));
if (ret.first) { if (ret.first) {
log->info_hex( log->info_hex(
msg_ptr, nof_bytes, "%s Tx SDU (%d B, tx_sdu_queue_len=%d)", RB_NAME, nof_bytes, tx_sdu_queue.size()); msg_ptr, nof_bytes, "%s Tx SDU (%d B, tx_sdu_queue_len=%d)\n", RB_NAME, nof_bytes, tx_sdu_queue.size());
} else { } else {
// in case of fail, the try_write returns back the sdu // in case of fail, the try_write returns back the sdu
log->info("[Dropped SDU] %s Tx SDU (%d B, tx_sdu_queue_len=%d)", RB_NAME, nof_bytes, tx_sdu_queue.size());
log->info_hex(ret.second->msg, log->info_hex(ret.second->msg,
ret.second->N_bytes, ret.second->N_bytes,
"[Dropped SDU] %s Tx SDU (%d B, tx_sdu_queue_len=%d)", "[Dropped SDU] %s Tx SDU (%d B, tx_sdu_queue_len=%d)\n",
RB_NAME, RB_NAME,
ret.second->N_bytes, ret.second->N_bytes,
tx_sdu_queue.size()); tx_sdu_queue.size());
@ -402,7 +406,7 @@ int rlc_am::rlc_am_tx::read_pdu(uint8_t *payload, uint32_t nof_bytes)
} }
// Tx STATUS if requested // Tx STATUS if requested
if(do_status() && not status_prohibited) { if (do_status() && not status_prohibited) {
pdu_size = build_status_pdu(payload, nof_bytes); pdu_size = build_status_pdu(payload, nof_bytes);
goto unlock_and_exit; goto unlock_and_exit;
} }

Loading…
Cancel
Save