check configured flag of SCell struct before enabling SCell

this prevents crashing the UE when receiving a SCell activation
command before the SCell has been configured from RRC
master
Andre Puschmann 5 years ago
parent 96c82b3fc6
commit 356fa9258b

@ -847,7 +847,13 @@ bool phy_common::is_mbsfn_sf(srslte_mbsfn_cfg_t* cfg, uint32_t phy_tti)
void phy_common::enable_scell(uint32_t cc_idx, bool enable)
{
if (cc_idx < SRSLTE_MAX_CARRIERS) {
if (scell_cfg[cc_idx].configured) {
scell_cfg[cc_idx].enabled = enable;
} else {
Error("Leaving SCell %s. cc_idx=%d has not been configured.\n",
scell_cfg[cc_idx].enabled ? "enabled" : "disabled",
cc_idx);
}
}
}

Loading…
Cancel
Save