X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Flwr_mac_fsm.c;h=be8a4b1f8d4476db074928f8bbc03caaeb90cc8e;hb=0d34456980069864f19fe3090ed5a4c968fe2d45;hp=494d6a532eef47889547e9d4483ea5624b1d9d4c;hpb=105199ef642ffe9736ea24a01d4546578fa25e60;p=o-du%2Fl2.git diff --git a/src/5gnrmac/lwr_mac_fsm.c b/src/5gnrmac/lwr_mac_fsm.c index 494d6a532..be8a4b1f8 100644 --- a/src/5gnrmac/lwr_mac_fsm.c +++ b/src/5gnrmac/lwr_mac_fsm.c @@ -3051,6 +3051,7 @@ uint8_t fillRarTxDataReq(fapi_tx_pdu_desc_t *pduDesc, RarInfo *rarInfo, uint8_t fillMsg4TxDataReq(fapi_tx_pdu_desc_t *pduDesc, Msg4Info *msg4Info, uint32_t *msgLen, uint16_t pduIndex) { + uint16_t idx = 0; uint32_t pduLen = 0; uint32_t *msg4TxDataValue = NULLP; @@ -3066,7 +3067,10 @@ uint8_t fillMsg4TxDataReq(fapi_tx_pdu_desc_t *pduDesc, Msg4Info *msg4Info, { return RFAILED; } - memcpy(msg4TxDataValue, msg4Info->msg4Pdu, msg4Info->msg4PduLen); + for(idx = 0; idx < msg4Info->msg4PduLen; idx++) + { + msg4TxDataValue[idx] = msg4Info->msg4Pdu[idx]; + } pduDesc[pduIndex].tlvs[0].value = (uint32_t)msg4TxDataValue; /* The total length of the PDU description and PDU data */ @@ -3353,13 +3357,16 @@ uint16_t sendTxDataReq(SlotIndInfo currTimingInfo, DlSchedInfo *dlInfo) MAC_FREE(dlInfo->rarAlloc,sizeof(RarAlloc)); dlInfo->rarAlloc = NULLP; } - if(dlInfo->msg4Alloc != NULLP) + if(dlInfo->msg4Alloc != NULLP && dlInfo->msg4Alloc->msg4Info.msg4Pdu != NULLP) { fillMsg4TxDataReq(txDataReq->pduDesc, &dlInfo->msg4Alloc->\ msg4Info, &msgLen, pduIndex); pduIndex++; txDataReq->numPdus++; - + + MAC_FREE(dlInfo->msg4Alloc->msg4Info.msg4Pdu,\ + dlInfo->msg4Alloc->msg4Info.msg4PduLen); + dlInfo->msg4Alloc->msg4Info.msg4Pdu = NULLP; MAC_FREE(dlInfo->msg4Alloc,sizeof(Msg4Alloc)); dlInfo->msg4Alloc = NULLP; }