Commit 8e7bd952 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Bugfix to update UE state and display correctly

parent c2f91a23
...@@ -508,7 +508,7 @@ void amf_n1::registration_request_handle(bool isNasSig, std::shared_ptr<nas_cont ...@@ -508,7 +508,7 @@ void amf_n1::registration_request_handle(bool isNasSig, std::shared_ptr<nas_cont
ue_info_t ueItem; ue_info_t ueItem;
//update_ue_information_statics(ueItem, "CM-CONNECTED", "REGISTRATION-INITIATING", ran_ue_ngap_id, amf_ue_ngap_id, nc.get()->imsi, "", uc.get()->cgi.mcc, uc.get()->cgi.mnc, uc.get()->cgi.nrCellID); //update_ue_information_statics(ueItem, "CM-CONNECTED", "REGISTRATION-INITIATING", ran_ue_ngap_id, amf_ue_ngap_id, nc.get()->imsi, "", uc.get()->cgi.mcc, uc.get()->cgi.mnc, uc.get()->cgi.nrCellID);
ueItem.connStatus = "5GMM-CONNECTED";//"CM-CONNECTED"; ueItem.connStatus = "5GMM-CONNECTED";//"CM-CONNECTED";
ueItem.registerStatus = "5GMM-REGISTRATION-INITIATED"; //5GMM-COMMON-PROCEDURE-INITIATED ueItem.registerStatus = "5GMM-REG-INITIATED"; //5GMM-COMMON-PROCEDURE-INITIATED
ueItem.ranid = ran_ue_ngap_id; ueItem.ranid = ran_ue_ngap_id;
ueItem.amfid = amf_ue_ngap_id; ueItem.amfid = amf_ue_ngap_id;
ueItem.imsi = nc.get()->imsi; ueItem.imsi = nc.get()->imsi;
......
...@@ -60,7 +60,7 @@ void statistics::display() { ...@@ -60,7 +60,7 @@ void statistics::display() {
int i = 0; int i = 0;
for (auto const &ue : ue_infos) { for (auto const &ue : ue_infos) {
Logger::amf_app().info("|%7d|%22s|19%s|%15s|%16d|%11d|%9s|%7d|", i + 1, ue.second.registerStatus.c_str(), ue.second.imsi.c_str(), ue.second.guti.c_str(), ue.second.ranid, ue.second.amfid, (ue.second.mcc + ue.second.mnc).c_str(), ue.second.cellId); Logger::amf_app().info("|%7d|%22s|%18s|%15s|%16d|%11d|%9s|%7d|", i + 1, ue.second.registerStatus.c_str(), ue.second.imsi.c_str(), ue.second.guti.c_str(), ue.second.ranid, ue.second.amfid, (ue.second.mcc + ue.second.mnc).c_str(), ue.second.cellId);
i++; i++;
} }
Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|"); Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|");
...@@ -95,6 +95,7 @@ void statistics::update_5gmm_state(const std::string& imsi, const std::string& s ...@@ -95,6 +95,7 @@ void statistics::update_5gmm_state(const std::string& imsi, const std::string& s
if (ue_infos.count(imsi) > 0) { if (ue_infos.count(imsi) > 0) {
ue_info_t ue_info = ue_infos.at(imsi); ue_info_t ue_info = ue_infos.at(imsi);
ue_info.registerStatus = state; ue_info.registerStatus = state;
ue_infos.erase(ue_info.imsi);
ue_infos.insert(std::pair<std::string, ue_info_t>(imsi, ue_info)); ue_infos.insert(std::pair<std::string, ue_info_t>(imsi, ue_info));
Logger::amf_app().debug("Update UE State (IMSI %s, State %s) success", imsi.c_str(), state.c_str()); Logger::amf_app().debug("Update UE State (IMSI %s, State %s) success", imsi.c_str(), state.c_str());
} else { } else {
......
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