Commit 09675f65 authored by Robert Schmidt's avatar Robert Schmidt

get_default_secondaryCellGroup(): make servingCellConfig const

We simply don't need to modify the servingCellConfig, so don't do it.
parent 05aa348f
...@@ -3040,7 +3040,7 @@ static NR_ServingCellConfigCommon_t *clone_ServingCellConfigCommon(const NR_Serv ...@@ -3040,7 +3040,7 @@ static NR_ServingCellConfigCommon_t *clone_ServingCellConfigCommon(const NR_Serv
} }
NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
NR_ServingCellConfig_t *servingcellconfigdedicated, const NR_ServingCellConfig_t *servingcellconfigdedicated,
const NR_UE_NR_Capability_t *uecap, const NR_UE_NR_Capability_t *uecap,
int scg_id, int scg_id,
int servCellIndex, int servCellIndex,
...@@ -3058,7 +3058,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC ...@@ -3058,7 +3058,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC
LOG_E(RRC, "No UE Capabilities available when programming default CellGroup in NSA\n"); LOG_E(RRC, "No UE Capabilities available when programming default CellGroup in NSA\n");
uint64_t bitmap = get_ssb_bitmap(servingcellconfigcommon); uint64_t bitmap = get_ssb_bitmap(servingcellconfigcommon);
// See comment at the end of this function regarding ServingCellConfig
NR_CellGroupConfig_t *secondaryCellGroup = calloc(1, sizeof(*secondaryCellGroup)); NR_CellGroupConfig_t *secondaryCellGroup = calloc(1, sizeof(*secondaryCellGroup));
secondaryCellGroup->cellGroupId = scg_id; secondaryCellGroup->cellGroupId = scg_id;
...@@ -3362,11 +3361,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC ...@@ -3362,11 +3361,6 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC
secondaryCellGroup->spCellConfig->spCellConfigDedicated->pathlossReferenceLinking = NULL; secondaryCellGroup->spCellConfig->spCellConfigDedicated->pathlossReferenceLinking = NULL;
secondaryCellGroup->spCellConfig->spCellConfigDedicated->servingCellMO = NULL; secondaryCellGroup->spCellConfig->spCellConfigDedicated->servingCellMO = NULL;
// this is pure evil: We should only pass in a ServingCellConfig, without
// modifying it! TODO: make a separate function that creates a
// ServingCellConfig, and reuse it here
*servingcellconfigdedicated = *secondaryCellGroup->spCellConfig->spCellConfigDedicated;
if (LOG_DEBUGFLAG(DEBUG_ASN1)) { if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NR_SpCellConfig, (void *)secondaryCellGroup->spCellConfig); xer_fprint(stdout, &asn_DEF_NR_SpCellConfig, (void *)secondaryCellGroup->spCellConfig);
} }
......
...@@ -91,7 +91,7 @@ NR_CellGroupConfig_t *decode_cellGroupConfig(const uint8_t *buffer, int max_buff ...@@ -91,7 +91,7 @@ NR_CellGroupConfig_t *decode_cellGroupConfig(const uint8_t *buffer, int max_buff
* configuration, but it will also overwrite the ServingCellConfig passed in * configuration, but it will also overwrite the ServingCellConfig passed in
* parameter servingcellconfigdedicated! */ * parameter servingcellconfigdedicated! */
NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
NR_ServingCellConfig_t *servingcellconfigdedicated, const NR_ServingCellConfig_t *servingcellconfigdedicated,
const NR_UE_NR_Capability_t *uecap, const NR_UE_NR_Capability_t *uecap,
int scg_id, int scg_id,
int servCellIndex, int servCellIndex,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment