Commit b3b52792 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

code cleanup

parent 6a3fef00
...@@ -1108,9 +1108,10 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) { ...@@ -1108,9 +1108,10 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
string mcc, mnc; string mcc, mnc;
plmn->getMcc(mcc); plmn->getMcc(mcc);
plmn->getMnc(mnc); plmn->getMnc(mnc);
printf(
Logger::amf_n2().debug(
"Handover required: Target ID GlobalRanNodeID PLmn (mcc: %s, mnc: %s, " "Handover required: Target ID GlobalRanNodeID PLmn (mcc: %s, mnc: %s, "
"gnbid: %ld)\n", "gnbid: %ld)",
mcc.c_str(), mnc.c_str(), gnbid->getValue()); mcc.c_str(), mnc.c_str(), gnbid->getValue());
TAI* tai = new TAI(); TAI* tai = new TAI();
...@@ -1121,14 +1122,14 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) { ...@@ -1121,14 +1122,14 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
string mccOfselectTAI, mncOfselectTAI; string mccOfselectTAI, mncOfselectTAI;
plmn->getMcc(mccOfselectTAI); plmn->getMcc(mccOfselectTAI);
plmn->getMnc(mncOfselectTAI); plmn->getMnc(mncOfselectTAI);
printf( Logger::amf_n2().debug(
"Handover required:Target ID selectedTAI PLmn=mcc%s mnc%s tac=%x\n", "Handover required:Target ID selectedTAI PLmn=mcc%s mnc%s tac=%x",
mccOfselectTAI.c_str(), mncOfselectTAI.c_str(), tac->getTac()); mccOfselectTAI.c_str(), mncOfselectTAI.c_str(), tac->getTac());
std::vector<PDUSessionResourceItem_t> List_HORqd; std::vector<PDUSessionResourceItem_t> List_HORqd;
if (!itti_msg.handoverReq->getPDUSessionResourceList(List_HORqd)) { if (!itti_msg.handoverReq->getPDUSessionResourceList(List_HORqd)) {
Logger::ngap().error( Logger::ngap().error(
"Decoding HandoverRequiredMsg getPDUSessionResourceList IE error"); "Decoding HandoverRequiredMsg getPDUSessionResourceList IE error");
return; return;
} }
...@@ -1386,7 +1387,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) { ...@@ -1386,7 +1387,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
ueContextReleaseCommand->setCauseRadioNetwork( ueContextReleaseCommand->setCauseRadioNetwork(
Ngap_CauseRadioNetwork_successful_handover); Ngap_CauseRadioNetwork_successful_handover);
uint8_t buffer[10240]; //TODO: remove hardcoded value uint8_t buffer[10240]; // TODO: remove hardcoded value
int encoded_size = ueContextReleaseCommand->encode2buffer(buffer, 10240); int encoded_size = ueContextReleaseCommand->encode2buffer(buffer, 10240);
bstring b = blk2bstr(buffer, encoded_size); bstring b = blk2bstr(buffer, encoded_size);
std::shared_ptr<nas_context> nc = std::shared_ptr<nas_context> nc =
...@@ -1415,7 +1416,6 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) { ...@@ -1415,7 +1416,6 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
set_ran_ue_ngap_id_2_ue_ngap_context(ran_ue_ngap_id, unc); set_ran_ue_ngap_id_2_ue_ngap_context(ran_ue_ngap_id, unc);
unc.get()->gnb_assoc_id = ngc.get()->gnb_assoc_id; unc.get()->gnb_assoc_id = ngc.get()->gnb_assoc_id;
} }
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -193,12 +193,14 @@ void HandoverNotifyMsg::setUserLocationInfoNR( ...@@ -193,12 +193,14 @@ void HandoverNotifyMsg::setUserLocationInfoNR(
// free_wrapper((void**) &ie); // free_wrapper((void**) &ie);
} }
uint32_t HandoverNotifyMsg::getRanUeNgapId() { uint32_t HandoverNotifyMsg::getRanUeNgapId() {
if (ranUeNgapId) if (ranUeNgapId)
return ranUeNgapId->getRanUeNgapId(); return ranUeNgapId->getRanUeNgapId();
else else
return 0; return 0;
} }
bool HandoverNotifyMsg::getUserLocationInfoNR( bool HandoverNotifyMsg::getUserLocationInfoNR(
struct NrCgi_s& cig, struct Tai_s& tai) { struct NrCgi_s& cig, struct Tai_s& tai) {
if (!userLocationInformation) return false; if (!userLocationInformation) return false;
......
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