Commit 7b3664cf authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for return value (unsigned int) for Service Request

parent 23a7f1bd
......@@ -603,8 +603,8 @@ void amf_n1::service_request_handle(
// Get PDU session status from Service Request
uint16_t pdu_session_status = (uint16_t) serReq->getPduSessionStatus();
if (pdu_session_status <
0) { // Get PDU Session Status from NAS Message Container
if (pdu_session_status == 0) {
// Get PDU Session Status from NAS Message Container if available
bstring plain_msg;
if (serReq->getNasMessageContainer(plain_msg)) {
uint8_t* buf_nas = (uint8_t*) bdata(plain_msg);
......@@ -614,8 +614,7 @@ void amf_n1::service_request_handle(
switch (message_type) {
case REGISTRATION_REQUEST: {
Logger::nas_mm().debug(
"NAS Message Container contains a Registration Request, handling "
"...");
"TODO: NAS Message Container contains a Registration Request");
} break;
case SERVICE_REQUEST: {
......
......@@ -241,7 +241,7 @@ int ServiceRequest::decodefrombuffer(
}
Logger::nas_mm().debug(
"Decoded ServiceRequest message len (%d)", decoded_size);
return 1;
return decoded_size;
}
//------------------------------------------------------------------------------
......@@ -251,7 +251,7 @@ uint8_t ServiceRequest::getngKSI() {
a = (ie_ngKSI->getTypeOfSecurityContext()) | ie_ngKSI->getasKeyIdentifier();
return a;
} else {
return -1;
return 0;
}
}
......@@ -269,7 +269,7 @@ uint16_t ServiceRequest::getPduSessionStatus() {
if (ie_PDU_session_status) {
return ie_PDU_session_status->getValue();
} else {
return -1;
return 0;
}
}
......@@ -278,7 +278,7 @@ uint16_t ServiceRequest::getAllowedPduSessionStatus() {
if (ie_allowed_PDU_session_status) {
return ie_allowed_PDU_session_status->getValue();
} else {
return -1;
return 0;
}
}
......@@ -297,7 +297,7 @@ uint8_t ServiceRequest::getServiceType() {
if (ie_service_type)
return ie_service_type->getValue();
else
return -1;
return 0;
}
//------------------------------------------------------------------------------
......
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