mirror of https://github.com/PentHertz/srsLTE.git
Make sure that RLC entity is only re-created if it switches modes.
This commit is contained in:
parent
0c20b7a455
commit
0ad0e9acac
|
@ -392,8 +392,10 @@ void rlc::add_bearer(uint32_t lcid, const rlc_config_t& cnfg)
|
||||||
rlc_common* rlc_entity = nullptr;
|
rlc_common* rlc_entity = nullptr;
|
||||||
|
|
||||||
if (cnfg.rlc_mode != rlc_mode_t::tm and rlc_array.find(lcid) != rlc_array.end()) {
|
if (cnfg.rlc_mode != rlc_mode_t::tm and rlc_array.find(lcid) != rlc_array.end()) {
|
||||||
// RLC entity already exists. Recreating it.
|
if (rlc_array[lcid]->get_mode() != cnfg.rlc_mode) {
|
||||||
rlc_array.erase(lcid);
|
rlc_log->info("Switching RLC entity type. Recreating it.\n");
|
||||||
|
rlc_array.erase(lcid);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (not valid_lcid(lcid)) {
|
if (not valid_lcid(lcid)) {
|
||||||
|
|
Loading…
Reference in New Issue