tiny cosmetic changes

master
Andre Puschmann 7 years ago
parent ee5b055829
commit 5444b2a0b7

@ -70,11 +70,11 @@ void pdcp_entity::init(srsue::rlc_interface_pdcp *rlc_,
cfg.sn_len = 0; cfg.sn_len = 0;
sn_len_bytes = 0; sn_len_bytes = 0;
if(cfg.is_control) { if (cfg.is_control) {
cfg.sn_len = 5; cfg.sn_len = 5;
sn_len_bytes = 1; sn_len_bytes = 1;
} }
if(cfg.is_data) { if (cfg.is_data) {
cfg.sn_len = 12; cfg.sn_len = 12;
sn_len_bytes = 2; sn_len_bytes = 2;
} }
@ -89,6 +89,7 @@ void pdcp_entity::reestablish() {
tx_count = 0; tx_count = 0;
rx_count = 0; rx_count = 0;
} else { } else {
// Only reset counter in RLC-UM
if (rlc->rb_is_um(lcid)) { if (rlc->rb_is_um(lcid)) {
tx_count = 0; tx_count = 0;
rx_count = 0; rx_count = 0;
@ -96,11 +97,13 @@ void pdcp_entity::reestablish() {
} }
} }
// Used to stop/pause the entity (called on RRC conn release)
void pdcp_entity::reset() void pdcp_entity::reset()
{ {
active = false; active = false;
if(log) if (log) {
log->debug("Reset %s\n", rrc->get_rb_name(lcid).c_str()); log->debug("Reset %s\n", rrc->get_rb_name(lcid).c_str());
}
} }
bool pdcp_entity::is_active() bool pdcp_entity::is_active()

@ -208,7 +208,7 @@ void rlc::write_sdu(uint32_t lcid, byte_buffer_t *sdu, bool blocking)
rlc_array.at(lcid)->write_sdu_nb(sdu); rlc_array.at(lcid)->write_sdu_nb(sdu);
} }
} else { } else {
rlc_log->warning("Writing SDU: lcid=%d. Deallocating sdu\n", lcid); rlc_log->warning("RLC LCID %d doesn't exist. Deallocating SDU\n", lcid);
byte_buffer_pool::get_instance()->deallocate(sdu); byte_buffer_pool::get_instance()->deallocate(sdu);
} }
pthread_rwlock_unlock(&rwlock); pthread_rwlock_unlock(&rwlock);
@ -220,7 +220,7 @@ void rlc::write_sdu_mch(uint32_t lcid, byte_buffer_t *sdu)
if (valid_lcid_mrb(lcid)) { if (valid_lcid_mrb(lcid)) {
rlc_array_mrb.at(lcid)->write_sdu_nb(sdu); rlc_array_mrb.at(lcid)->write_sdu_nb(sdu);
} else { } else {
rlc_log->warning("Writing SDU: lcid=%d. Deallocating sdu\n", lcid); rlc_log->warning("RLC LCID %d doesn't exist. Deallocating SDU\n", lcid);
byte_buffer_pool::get_instance()->deallocate(sdu); byte_buffer_pool::get_instance()->deallocate(sdu);
} }
pthread_rwlock_unlock(&rwlock); pthread_rwlock_unlock(&rwlock);

Loading…
Cancel
Save