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

Code cleanup

parent 3568333c
......@@ -335,6 +335,7 @@ void amf_app::handle_post_sm_context_response_error_400() {
Logger::amf_app().error("Post SM context response error 400");
}
//------------------------------------------------------------------------------
bool amf_app::generate_5g_guti(
uint32_t ranid, long amfid, string& mcc, string& mnc, uint32_t& tmsi) {
string ue_context_key =
......
......@@ -467,8 +467,6 @@ void amf_config::display() {
" Api version ..........: %s", ausf_addr.api_version.c_str());
}
// Logger::config().info(" HTTP2 port ............: %d", n11_http2_port);
Logger::config().info("- Remote SMF Pool.........: ");
for (int i = 0; i < smf_pool.size(); i++) {
std::string selected;
......
......@@ -125,7 +125,6 @@ typedef struct interface_cfg_s {
struct in6_addr addr6;
unsigned int mtu;
unsigned int port;
// util::thread_sched_params thread_rd_sched_params;
} interface_cfg_t;
typedef struct itti_cfg_s {
......
This diff is collapsed.
......@@ -69,8 +69,6 @@ class amf_n11 {
bool smf_selection_from_configuration(
std::string& smf_addr, std::string& smf_api_version);
// bool smf_selection_from_context(
// std::string& smf_addr, std::string& smf_api_version);
void handle_post_sm_context_response_error_400();
void handle_post_sm_context_response_error(
long code, std::string cause, bstring n1sm, std::string supi,
......
......@@ -1115,7 +1115,6 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
/**************************send HandoverCommandMsg to Source
* gnb**************************/
// HandoverCommandMsg* handovercommand = new HandoverCommandMsg();
std::unique_ptr<HandoverCommandMsg> handovercommand =
std::make_unique<HandoverCommandMsg>();
handovercommand->setMessageType();
......@@ -1162,7 +1161,6 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
/**************************setPduSessionResourceHandoverList_PDYSessionID_handovercommandtransfer-end**************************/
uint8_t buffer[10240];
int encoded_size = handovercommand->encode2buffer(buffer, 10240);
// delete handovercommand;
bstring b = blk2bstr(buffer, encoded_size);
std::shared_ptr<ue_ngap_context> unc;
if (!is_ran_ue_id_2_ue_ngap_context(ran_id_Global)) {
......@@ -1202,8 +1200,7 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
Logger::amf_n2().debug("Missing IE UserLocationInformationNR");
return;
}
// UEContextReleaseCommandMsg* ueContextReleaseCommand =
// new UEContextReleaseCommandMsg();
std::unique_ptr<UEContextReleaseCommandMsg> ueContextReleaseCommand =
std::make_unique<UEContextReleaseCommandMsg>();
ueContextReleaseCommand->setMessageType();
......@@ -1212,7 +1209,6 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
Ngap_CauseRadioNetwork_successful_handover);
uint8_t buffer[10240];
int encoded_size = ueContextReleaseCommand->encode2buffer(buffer, 10240);
// delete ueContextReleaseCommand;
bstring b = blk2bstr(buffer, encoded_size);
std::shared_ptr<nas_context> nc =
amf_n1_inst->amf_ue_id_2_nas_context(amf_ue_ngap_id);
......@@ -1289,8 +1285,7 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
amf_DL_value->getvalue(amf_dl_pdcp, amf_hfn_dl_pdcp);
long amf_drb_id;
amf_drb_id = *amf_dRB_id;
// DownlinkRANStatusTransfer* downLinkranstatustransfer =
// new DownlinkRANStatusTransfer();
std::unique_ptr<DownlinkRANStatusTransfer> downLinkranstatustransfer =
std::make_unique<DownlinkRANStatusTransfer>();
downLinkranstatustransfer->setmessagetype();
......@@ -1300,15 +1295,14 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
amf_drb_id, amf_ul_pdcp, amf_hfn_ul_pdcp, amf_dl_pdcp, amf_hfn_dl_pdcp);
uint8_t buffer[1024];
int encode_size = downLinkranstatustransfer->encodetobuffer(buffer, 1024);
// delete downLinkranstatustransfer;
bstring b = blk2bstr(buffer, encode_size);
// std::shared_ptr<ue_ngap_context> ngc =
// ran_ue_id_2_ue_ngap_context(AMF_TARGET_ran_id_global);
sctp_s_38412.sctp_send_msg(downlink_sctp_assoc_id, 0, &b);
}
// Context management functions
//------------------------------------------------------------------------------
bool amf_n2::is_ran_ue_id_2_ue_ngap_context(
const uint32_t& ran_ue_ngap_id) const {
std::shared_lock lock(m_ranid2uecontext);
......
......@@ -36,6 +36,7 @@
#define KEY_LENGTH (16)
#define SQN_LENGTH (6)
#define RAND_LENGTH (16)
typedef struct {
uint8_t key[KEY_LENGTH];
uint8_t sqn[SQN_LENGTH];
......
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