Commit a14450d2 authored by WEI-TAI CHEN's avatar WEI-TAI CHEN

fix segmentation fault

parent 616a66b7
......@@ -391,14 +391,6 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
bwp_dl_searchspace->nrofCandidates = CALLOC(1,sizeof(struct NR_SearchSpace__nrofCandidates));
bwp_dl_searchspace->searchSpaceType = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType));
bwp_dl_searchspace->searchSpaceType->choice.common = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_0));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.ue_Specific = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__ue_Specific));
bwp_dl_timedomainresourceallocation = CALLOC(1,sizeof(struct NR_PDSCH_TimeDomainResourceAllocation));
......@@ -552,6 +544,14 @@ void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
bwp_dl_searchspace->searchSpaceType->present = configuration->SearchSpace_searchSpaceType[CC_id];
if(bwp_dl_searchspace->searchSpaceType->present == NR_SearchSpace__searchSpaceType_PR_common){
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_0));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel8 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel16 = CALLOC(1,sizeof(long));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3 = CALLOC(1,sizeof(struct NR_SearchSpace__searchSpaceType__common__dci_Format2_3));
bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_3->monitoringPeriodicity = CALLOC(1,sizeof(long));
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel1) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id];
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel2) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id];
*(bwp_dl_searchspace->searchSpaceType->choice.common->dci_Format2_0->nrofCandidates_SFI.aggregationLevel4) = configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id];
......
......@@ -152,7 +152,7 @@ gNBs =
commonSearchSpaces_controlResourceSetId = 5;
SearchSpace_monitoringSlotPeriodicityAndOffset_choice = "sl1";
SearchSpace_monitoringSlotPeriodicityAndOffset_value = 0;
SearchSpace_duration = 0;
SearchSpace_duration = 2;
SearchSpace_nrofCandidates_aggregationLevel1 = 0;
SearchSpace_nrofCandidates_aggregationLevel2 = 0;
SearchSpace_nrofCandidates_aggregationLevel4 = 0;
......
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