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
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);
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.amfid = amf_ue_ngap_id;
ueItem.imsi = nc.get()->imsi;
......
......@@ -60,7 +60,7 @@ void statistics::display() {
int i = 0;
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++;
}
Logger::amf_app().info("|----------------------------------------------------------------------------------------------------------------|");
......@@ -95,6 +95,7 @@ void statistics::update_5gmm_state(const std::string& imsi, const std::string& s
if (ue_infos.count(imsi) > 0) {
ue_info_t ue_info = ue_infos.at(imsi);
ue_info.registerStatus = state;
ue_infos.erase(ue_info.imsi);
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());
} 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