Commit 907517be authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Display correct NSSAI info

parent 66998970
......@@ -1294,9 +1294,7 @@ void amf_n1::registration_request_handle(
}
for (auto r : nc.get()->requestedNssai) {
Logger::nas_mm().debug(
"Requested NSSAI SST (0x%x) SD (0x%x) hplmnSST (0x%x) hplmnSD (%d)",
r.sst, r.sd, r.mHplmnSst, r.mHplmnSd);
Logger::nas_mm().debug("Requested NSSAI: %s", r.ToString());
}
nc.get()->ctx_avaliability_ind = true;
......@@ -1324,10 +1322,7 @@ void amf_n1::registration_request_handle(
} else {
for (auto s : nc.get()->requestedNssai) {
Logger::amf_n1().debug(
"Requested NSSAI inside the NAS container: SST (0x%x) SD (0x%x) "
"hplmnSST (0x%x) hplmnSD "
"(%d)",
s.sst, s.sd, s.mHplmnSst, s.mHplmnSd);
"Requested NSSAI inside the NAS container: %s", s.ToString());
}
}
} else {
......@@ -2531,10 +2526,7 @@ void amf_n1::security_mode_complete_handle(
// Get Requested NSSAI (Optional IE), if provided
if (registration_request->getRequestedNssai(nc.get()->requestedNssai)) {
for (auto s : nc.get()->requestedNssai) {
Logger::amf_n1().debug(
"Requested NSSAI SST (0x%x) SD (0x%x) hplmnSST (0x%x) hplmnSD "
"(%d)",
s.sst, s.sd, s.mHplmnSst, s.mHplmnSd);
Logger::amf_n1().debug("Requested NSSAI: %s", s.ToString());
}
} else {
Logger::amf_n1().debug("No Optional IE RequestedNssai available");
......@@ -3167,10 +3159,7 @@ void amf_n1::ul_nas_transport_handle(
snssai = nc.get()->requestedNssai[0];
}
Logger::amf_n1().debug(
"S_NSSAI for this PDU Session SST (0x%x) SD (0x%x) hplmnSST (0x%x) "
"hplmnSD (0x%x)",
snssai.sst, snssai.sd, snssai.mHplmnSst, snssai.mHplmnSd);
Logger::amf_n1().debug("S_NSSAI for this PDU Session %s", snssai.ToString());
bstring dnn = bfromcstr("default");
bstring sm_msg;
......
......@@ -221,10 +221,7 @@ int NSSAI::decodefrombuffer(uint8_t* buf, int len, bool is_option) {
}
for (int i = 0; i < S_NSSAIs.size(); i++) {
Logger::nas_mm().debug(
"Decoded NSSAI SST (0x%x) SD (0x%x) hplmnSST (0x%x) hplmnSD (%d)",
S_NSSAIs.at(i).sst, S_NSSAIs.at(i).sd, S_NSSAIs.at(i).mHplmnSst,
S_NSSAIs.at(i).mHplmnSd);
Logger::nas_mm().debug("Decoded NSSAI %s", S_NSSAIs.at(i).ToString());
}
Logger::nas_mm().debug("Decoded NSSAI len (%d)", decoded_size);
return decoded_size;
......
......@@ -173,7 +173,7 @@ std::string S_NSSAI::ToString() {
//------------------------------------------------------------------------------
int S_NSSAI::encode2buffer(uint8_t* buf, int len) {
Logger::nas_mm().debug("Encoding S_NSSAI");
Logger::nas_mm().debug("Encoding S-NSSAI");
if (len < length) {
Logger::nas_mm().error("len is less than %d", length);
return 0;
......@@ -202,7 +202,7 @@ int S_NSSAI::encode2buffer(uint8_t* buf, int len) {
if (mapped_hplmn_sd_.has_value())
ENCODE_U24(buf + encoded_size, mapped_hplmn_sd_.value(), encoded_size);
Logger::nas_mm().debug("encoded S_NSSAI len (%d)", encoded_size);
Logger::nas_mm().debug("Encoded S-NSSAI len (%d)", encoded_size);
return encoded_size;
}
......@@ -273,7 +273,7 @@ int S_NSSAI::decodefrombuffer(uint8_t* buf, int len, const bool is_option) {
} break;
}
Logger::nas_mm().debug("Decoded NSSAI %s", ToString().c_str());
Logger::nas_mm().debug("Decoded S_NSSAI len (%d)", decoded_size);
Logger::nas_mm().debug("Decoded S-NSSAI %s", ToString().c_str());
Logger::nas_mm().debug("Decoded S-NSSAI len (%d)", decoded_size);
return decoded_size;
}
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