X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_sys_info_hdl.c;h=7ce598fb507dd78d1f7d5e523f0ea16324c45a63;hb=12da8be0c4941e107b9ff0d18ce5b6eb7f5f7d20;hp=6644079e1b4ea8c9ea684c9c8660744039e82d27;hpb=c946e9243610d6fb122e34674eeab874f7d2f7a4;p=o-du%2Fl2.git diff --git a/src/du_app/du_sys_info_hdl.c b/src/du_app/du_sys_info_hdl.c index 6644079e1..7ce598fb5 100644 --- a/src/du_app/du_sys_info_hdl.c +++ b/src/du_app/du_sys_info_hdl.c @@ -191,7 +191,7 @@ uint8_t BuildMibPdu() xer_fprint(stdout, &asn_DEF_BCCH_BCH_Message, bcchMsg); memset(encBuf, 0, ENC_BUF_MAX_LEN); encBufSize = 0; - encRetVal = aper_encode(&asn_DEF_BCCH_BCH_Message, 0, + encRetVal = uper_encode(&asn_DEF_BCCH_BCH_Message, 0, bcchMsg, PrepFinalEncBuf, encBuf); printf("\nencbufSize:%d\n", encBufSize); if(encRetVal.encoded == -1) @@ -203,12 +203,14 @@ uint8_t BuildMibPdu() break; } +#ifdef DEBUG_ASN_PRINT /* Print encoded buffer */ for(int i=0; i< encBufSize; i++) { printf("%x\t",encBuf[i]); } printf("\n"); +#endif ret = ROK; break; @@ -285,7 +287,7 @@ uint8_t BuildMibMsg() xer_fprint(stdout, &asn_DEF_MIB, mibMsg); memset(encBuf, 0, ENC_BUF_MAX_LEN); encBufSize = 0; - encRetVal = aper_encode(&asn_DEF_MIB, 0, + encRetVal = uper_encode(&asn_DEF_MIB, 0, mibMsg, PrepFinalEncBuf, encBuf); printf("\nencbufSize:%d\n", encBufSize); if(encRetVal.encoded == -1) @@ -297,12 +299,14 @@ uint8_t BuildMibMsg() break; } +#ifdef DEBUG_ASN_PRINT /* Print encoded buffer */ for(int i=0; i< encBufSize; i++) { printf("%x\t",encBuf[i]); } printf("\n"); +#endif /* Free allocated memory */ ret = ROK; @@ -333,7 +337,6 @@ uint8_t BuildMibMsg() uint8_t BuildCellIdentity(CellIdentity_t *cellIdentity) { cellIdentity->size = ODU_VALUE_FIVE*sizeof(uint8_t); - cellIdentity->bits_unused = ODU_VALUE_FOUR; DU_ALLOC(cellIdentity->buf, cellIdentity->size); if(!cellIdentity->buf) @@ -341,8 +344,7 @@ uint8_t BuildCellIdentity(CellIdentity_t *cellIdentity) DU_LOG("\nERROR --> DU APP: CellIdentity memory allocation failure"); return RFAILED; } - memset(cellIdentity->buf, 0, cellIdentity->size); - cellIdentity->buf[4] = duCfgParam.sib1Params.cellIdentity; + fillBitString(cellIdentity, ODU_VALUE_FOUR, ODU_VALUE_FIVE, duCfgParam.sib1Params.cellIdentity); return ROK; } @@ -945,7 +947,8 @@ uint8_t BuildCommonSerachSpaceList( struct PDCCH_ConfigCommon__commonSearchSpace DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed"); return RFAILED; } - + + searchSpace->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0 = NULLP; DU_ALLOC(searchSpace->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0, \ sizeof(struct SearchSpace__searchSpaceType__common__dci_Format0_0_AndFormat1_0)); if(!searchSpace->searchSpaceType->choice.common->dci_Format0_0_AndFormat1_0) @@ -953,6 +956,11 @@ uint8_t BuildCommonSerachSpaceList( struct PDCCH_ConfigCommon__commonSearchSpace DU_LOG("\nERROR --> DU APP : Common search space list memory alloc failed"); return RFAILED; } + + searchSpace->searchSpaceType->choice.common->dci_Format2_0 = NULLP; + searchSpace->searchSpaceType->choice.common->dci_Format2_1 = NULLP; + searchSpace->searchSpaceType->choice.common->dci_Format2_2 = NULLP; + searchSpace->searchSpaceType->choice.common->dci_Format2_3 = NULLP; break; } case SearchSpace__searchSpaceType_PR_ue_Specific: @@ -965,7 +973,6 @@ uint8_t BuildCommonSerachSpaceList( struct PDCCH_ConfigCommon__commonSearchSpace return RFAILED; } } - return ROK; }/* BuildCommonSerachSpaceList */ @@ -1080,7 +1087,6 @@ uint8_t BuildPdcchCfgCommon(struct BWP_DownlinkCommon__pdcch_ConfigCommon *pdcch return RFAILED; } *pdcchSetup->ra_SearchSpace = duPdcchCfg.raSearchSpc; - break; } default : @@ -2452,7 +2458,7 @@ uint8_t BuildSib1Msg() /* Encode the F1SetupRequest type as APER */ memset(encBuf, 0, ENC_BUF_MAX_LEN); encBufSize = 0; - encRetVal = aper_encode(&asn_DEF_SIB1, 0, sib1Msg, PrepFinalEncBuf,\ + encRetVal = uper_encode(&asn_DEF_SIB1, 0, sib1Msg, PrepFinalEncBuf,\ encBuf); printf("\nencbufSize: %d\n", encBufSize); if(encRetVal.encoded == -1) @@ -2463,11 +2469,13 @@ uint8_t BuildSib1Msg() "unknown"); break; } +#ifdef DEBUG_ASN_PRINT for(int i=0; i< encBufSize; i++) { printf("%x\t",encBuf[i]); } printf("\n"); +#endif ret = ROK; break; @@ -2865,7 +2873,7 @@ void FreePuschCfgCommon(struct BWP_UplinkCommon__pusch_ConfigCommon *puschCfg) /* P0 Nominal with grant */ DU_FREE(setup->p0_NominalWithGrant, sizeof(long)); - DU_ALLOC(puschCfg->choice.setup, sizeof(PUSCH_ConfigCommon_t)); + DU_FREE(puschCfg->choice.setup, sizeof(PUSCH_ConfigCommon_t)); } }/* BuildPuschCfgCommon */