X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcu_stub%2Fcu_f1ap_msg_hdl.c;h=a7ce195dd0949fc89e4337314b34804195f54d16;hb=5ea4c59cb4dd37164953218b0bd355284e11d22c;hp=4313f699d37040d88f374a3c72d44da6ccfe7aa1;hpb=ef711b0830aedde36f4a1beceed146d08e77ce58;p=o-du%2Fl2.git diff --git a/src/cu_stub/cu_f1ap_msg_hdl.c b/src/cu_stub/cu_f1ap_msg_hdl.c index 4313f699d..a7ce195dd 100644 --- a/src/cu_stub/cu_f1ap_msg_hdl.c +++ b/src/cu_stub/cu_f1ap_msg_hdl.c @@ -21,32 +21,6 @@ #include "cu_stub_sctp.h" #include "cu_f1ap_msg_hdl.h" -char encBuf[ENC_BUF_MAX_LEN]; - -/******************************************************************* - * - * @brief Writes the encoded chunks into a buffer - * - * @details - * - * Function : PrepFinalEncBuf - * - * Functionality:Fills the encoded buffer - * - * @params[in] void *buffer,initial encoded data - * @params[in] size_t size,size of buffer - * @params[in] void *encodedBuf,final buffer - * @return ROK - success - * RFAILED - failure - * - * ****************************************************************/ -static int PrepFinalEncBuf(const void *buffer, size_t size, void *encodedBuf) -{ - memcpy(encodedBuf + encBufSize, buffer, size); - encBufSize += size; - return 0; -} /* PrepFinalEncBuf */ - /******************************************************************* * * @brief Sends F1 msg over SCTP @@ -97,24 +71,6 @@ S16 SendF1APMsg(Region region, Pool pool) RETVALUE(ROK); } /* SendF1APMsg */ - -void plmnBuildCU(Plmn plmn, OCTET_STRING_t *octe) -{ - U8 mncCnt; - mncCnt = 2; - octe->buf[0] = ((plmn.mcc[1] << 4) | (plmn.mcc[0])); - if(mncCnt == 2) - { - octe->buf[1] = ((0xf0) | (plmn.mcc[2])); - octe->buf[2] = ((plmn.mnc[1] << 4) | (plmn.mnc[0])); - } - else - { - octe->buf[1] = ((plmn.mnc[0] << 4) | (plmn.mcc[2])); - octe->buf[2] = ((plmn.mnc[2] << 4) | (plmn.mnc[1])); - } -} - /******************************************************************* * * @brief Builds NRCell ID @@ -347,7 +303,7 @@ S16 BuildAndSendF1SetupRsp() CU_FREE(f1apMsg, sizeof(F1AP_PDU_t)); RETVALUE(RFAILED); } - plmnBuildCU(cuCfgParams.plmn , &cellToActivate->list.array[0]->value.choice.\ + buildPlmnId(cuCfgParams.plmn , &cellToActivate->list.array[0]->value.choice.\ Cells_to_be_Activated_List_Item.nRCGI.pLMN_Identity); cellToActivate->list.array[0]->value.choice.Cells_to_be_Activated_List_Item.\ nRCGI.nRCellIdentity.size = 5; @@ -1052,7 +1008,7 @@ void F1APMsgHdlr(Buffer *mBuf) { DU_LOG("\nF1AP : F1 setup request received"); BuildAndSendF1SetupRsp(); - break; + break; } case InitiatingMessage__value_PR_GNBDUConfigurationUpdate: