Commit fdd34d52 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Include SD (NSSAI) into PDU Session Establishment Accept

parent 6e8b801d
......@@ -44,7 +44,7 @@ int encode_snssai(SNSSAI snssai, uint8_t iei, uint8_t* buffer, uint32_t len) {
}
ielen = snssai.len;
ielen = 1;
// ielen = 1;
*(buffer + encoded) = ielen;
encoded++;
......@@ -56,9 +56,9 @@ int encode_snssai(SNSSAI snssai, uint8_t iei, uint8_t* buffer, uint32_t len) {
(ielen == SST_AND_SD_AND_MAPPEDHPLMNSST_LENGTH) ||
(ielen == SST_AND_SD_AND_MAPPEDHPLMNSST_AND_MAPPEDHPLMNSD_LENGTH)) {
bit32Stream = snssai.sd;
ENCODE_U8(buffer + encoded, (uint8_t) bit32Stream, encoded);
ENCODE_U8(buffer + encoded, (uint8_t)(bit32Stream >> 8), encoded);
ENCODE_U8(buffer + encoded, (uint8_t)(bit32Stream >> 16), encoded);
ENCODE_U8(buffer + encoded, (uint8_t)(bit32Stream >> 8), encoded);
ENCODE_U8(buffer + encoded, (uint8_t) bit32Stream, encoded);
}
if ((ielen == SST_AND_MAPPEDHPLMNSST_LENGTH) ||
......
......@@ -207,7 +207,7 @@ bool smf_n1::create_n1_pdu_session_establishment_accept(
try {
sm_msg->pdu_session_establishment_accept.snssai.sd =
std::stoul(sm_context_res.get_snssai().sD, nullptr, 16);
std::stoul(sm_context_res.get_snssai().sD, nullptr, 10);
} catch (const std::exception& e) {
Logger::smf_n1().warn(
"Error when converting from string to int for snssai.SD, error: %s",
......
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