Commit 2009b4c7 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Code cleanup

parent 618a4d1c
......@@ -2186,15 +2186,12 @@ bool amf_n2::get_common_plmn(
plmn_slice_support_item.mnc = list[j].b_plmn_list[k].mnc;
for (auto s1 : list[j].b_plmn_list[k].slice_list) {
// for debugging purpose
Logger::amf_n2().debug(
"S-NSSAI from gNB (SST %s, SD %s)", s1.sst.c_str(),
s1.sd.c_str());
for (auto s2 : amf_cfg.plmn_list[i].slice_list) {
// for debugging purpose
Logger::amf_n2().debug(
"S-NSSAI from AMF (SST %d, SD %ld, SD %s)", s2.sst, s2.sd,
"S-NSSAI from AMF (SST %d, SD %s)", s2.sst,
std::to_string(s2.sd).c_str());
if ((s1.sst.compare(std::to_string(s2.sst)) == 0) and
(s1.sd.compare(std::to_string(s2.sd)) == 0)) {
......
......@@ -78,13 +78,12 @@ bool S_NSSAI::sDdecodefromOctetString(Ngap_SD_t* m_sd) {
if (!m_sd->buf) return false;
if (m_sd->size == 3) {
sd = ((m_sd->buf[0] << 16) + (m_sd->buf[1] << 8) + m_sd->buf[2]);
return true;
} else if (m_sd->size == 4) {
sd = ((m_sd->buf[1] << 16) + (m_sd->buf[2] << 8) + m_sd->buf[3]);
return true;
}
// sd = *(uint32_t*) m_sd->buf & 0x00ffffff;
return true;
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