Commit 7807ba9a authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for decoding PDU Session Status

parent 7b3664cf
......@@ -626,7 +626,7 @@ void amf_n1::service_request_handle(
nullptr, (uint8_t*) bdata(plain_msg), blength(plain_msg));
bdestroy(plain_msg);
if (serReqNas->getPduSessionStatus() > 0) {
pdu_session_status = serReqNas->getPduSessionStatus();
pdu_session_status = (uint16_t) serReqNas->getPduSessionStatus();
}
} break;
......
......@@ -28,6 +28,7 @@
#include "PDU_Session_Status.hpp"
#include "logger.hpp"
#include "common_defs.h"
using namespace nas;
//------------------------------------------------------------------------------
......@@ -98,14 +99,12 @@ int PDU_Session_Status::decodefrombuffer(
if (is_option) {
decoded_size++;
}
_value = 0x0000;
length = *(buf + decoded_size);
decoded_size++;
_value |= *(buf + decoded_size);
decoded_size++;
_value |= (*(buf + decoded_size)) << 8;
decoded_size++;
Logger::nas_mm().debug("decoded PDU_Session_Status value(0x%4x)", _value);
DECODE_U16(buf + decoded_size, _value, decoded_size);
Logger::nas_mm().debug("decoded PDU_Session_Status value (0x%x)", _value);
Logger::nas_mm().debug("decoded PDU_Session_Status 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