Commit 618a4d1c authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for SSD

parent 67034a50
......@@ -77,10 +77,10 @@ bool S_NSSAI::sDEncode2OctetString(Ngap_SD_t* m_sd) {
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]);
sd = ((m_sd->buf[0] << 16) + (m_sd->buf[1] << 8) + m_sd->buf[2]);
} else if (m_sd->size == 4) {
sd = ((m_sd->buf[1] >> 16) + (m_sd->buf[2] >> 8) + m_sd->buf[3]);
sd = ((m_sd->buf[1] << 16) + (m_sd->buf[2] << 8) + m_sd->buf[3]);
}
// sd = *(uint32_t*) m_sd->buf & 0x00ffffff;
......
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