Commit 0869cc8f authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Minor fix for new/delete

parent 98be13f3
...@@ -862,7 +862,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) { ...@@ -862,7 +862,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
// UEAggregateMaximumBitRate // UEAggregateMaximumBitRate
msg->setUEAggregateMaxBitRate( msg->setUEAggregateMaxBitRate(
0x08a7d8c0, 0x20989680); // TODO: remove hardcoded value UE_AGGREGATE_MAXIMUM_BIT_RATE_DL, UE_AGGREGATE_MAXIMUM_BIT_RATE_UL);
// TODO: Mobility RestrictionList // TODO: Mobility RestrictionList
} }
...@@ -942,7 +942,8 @@ void amf_n2::handle_itti_message( ...@@ -942,7 +942,8 @@ void amf_n2::handle_itti_message(
item.pduSessionResourceSetupRequestTransfer.size = blength(itti_msg.n2sm); item.pduSessionResourceSetupRequestTransfer.size = blength(itti_msg.n2sm);
list.push_back(item); list.push_back(item);
psrsr->setPduSessionResourceSetupRequestList(list); psrsr->setPduSessionResourceSetupRequestList(list);
psrsr->setUEAggregateMaxBitRate(0x08a7d8c0, 0x20989680); psrsr->setUEAggregateMaxBitRate(
UE_AGGREGATE_MAXIMUM_BIT_RATE_DL, UE_AGGREGATE_MAXIMUM_BIT_RATE_UL);
size_t buffer_size = BUFFER_SIZE_512; size_t buffer_size = BUFFER_SIZE_512;
char* buffer = (char*) calloc(1, buffer_size); char* buffer = (char*) calloc(1, buffer_size);
int encoded_size = 0; int encoded_size = 0;
...@@ -1194,8 +1195,7 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) { ...@@ -1194,8 +1195,7 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
"Handover Required: Target ID selected TAI PLMN (MCC %s, MNC %s, TAC %x)", "Handover Required: Target ID selected TAI PLMN (MCC %s, MNC %s, TAC %x)",
mccOfselectTAI.c_str(), mncOfselectTAI.c_str(), tac->getTac()); mccOfselectTAI.c_str(), mncOfselectTAI.c_str(), tac->getTac());
OCTET_STRING_t sourceTotarget; OCTET_STRING_t sourceTotarget =
sourceTotarget =
itti_msg.handoverReq->getSourceToTarget_TransparentContainer(); itti_msg.handoverReq->getSourceToTarget_TransparentContainer();
// TODO: T-AMF selection, for now use the same AMF // TODO: T-AMF selection, for now use the same AMF
...@@ -1210,7 +1210,7 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) { ...@@ -1210,7 +1210,7 @@ bool amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
Ngap_Cause_PR_radioNetwork, Ngap_Cause_PR_radioNetwork,
Ngap_CauseRadioNetwork_handover_desirable_for_radio_reason); Ngap_CauseRadioNetwork_handover_desirable_for_radio_reason);
handover_request->setUEAggregateMaximumBitRate( handover_request->setUEAggregateMaximumBitRate(
300000000, 100000000); // TODO: remove hardcoded values UE_AGGREGATE_MAXIMUM_BIT_RATE_DL, UE_AGGREGATE_MAXIMUM_BIT_RATE_UL);
handover_request->setUESecurityCapabilities( handover_request->setUESecurityCapabilities(
0xe000, 0xe000, 0xe000, 0xe000); // TODO: remove hardcoded values 0xe000, 0xe000, 0xe000, 0xe000); // TODO: remove hardcoded values
......
...@@ -109,4 +109,7 @@ constexpr auto CURL_MIME_BOUNDARY = "----Boundary"; ...@@ -109,4 +109,7 @@ constexpr auto CURL_MIME_BOUNDARY = "----Boundary";
#define FUTURE_STATUS_TIMEOUT_MS 100 #define FUTURE_STATUS_TIMEOUT_MS 100
#define UE_AGGREGATE_MAXIMUM_BIT_RATE_DL 300000000
#define UE_AGGREGATE_MAXIMUM_BIT_RATE_UL 200000000
#endif #endif
...@@ -54,9 +54,9 @@ HandoverNotifyMsg::HandoverNotifyMsg() { ...@@ -54,9 +54,9 @@ HandoverNotifyMsg::HandoverNotifyMsg() {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
HandoverNotifyMsg::~HandoverNotifyMsg() { HandoverNotifyMsg::~HandoverNotifyMsg() {
if (amfUeNgapId) free(amfUeNgapId); if (amfUeNgapId) delete (amfUeNgapId);
if (ranUeNgapId) free(ranUeNgapId); if (ranUeNgapId) delete (ranUeNgapId);
if (userLocationInformation) free(userLocationInformation); if (userLocationInformation) delete (userLocationInformation);
if (handoverNotifyPdu) free(handoverNotifyPdu); if (handoverNotifyPdu) free(handoverNotifyPdu);
if (handoverNotifyIEs) free(handoverNotifyIEs); if (handoverNotifyIEs) free(handoverNotifyIEs);
}; };
......
...@@ -56,10 +56,10 @@ InitialContextSetupFailureMsg::InitialContextSetupFailureMsg() { ...@@ -56,10 +56,10 @@ InitialContextSetupFailureMsg::InitialContextSetupFailureMsg() {
InitialContextSetupFailureMsg::~InitialContextSetupFailureMsg() { InitialContextSetupFailureMsg::~InitialContextSetupFailureMsg() {
if (initialContextSetupFailurePdu) free(initialContextSetupFailurePdu); if (initialContextSetupFailurePdu) free(initialContextSetupFailurePdu);
if (initialContextSetupFailureIEs) free(initialContextSetupFailureIEs); if (initialContextSetupFailureIEs) free(initialContextSetupFailureIEs);
if (amfUeNgapId) free(amfUeNgapId); if (amfUeNgapId) delete (amfUeNgapId);
if (ranUeNgapId) free(ranUeNgapId); if (ranUeNgapId) delete (ranUeNgapId);
if (pduSessionResourceFailedToSetupFailureList) if (pduSessionResourceFailedToSetupFailureList)
free(pduSessionResourceFailedToSetupFailureList); delete (pduSessionResourceFailedToSetupFailureList);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
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