Commit c2397656 authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Fix PTI issue

parent 24987880
......@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <stdint.h>
#include "common_types.h"
#include "TLVEncoder.h"
#include "TLVDecoder.h"
#include "ProcedureTransactionIdentity.h"
......@@ -30,54 +31,17 @@
int encode_procedure_transaction_identity(
ProcedureTransactionIdentity proceduretransactionidentity, uint8_t iei,
uint8_t* buffer, uint32_t len) {
uint32_t encoded = 0;
int encode_result;
uint8_t encoded = 0;
CHECK_PDU_POINTER_AND_LENGTH_ENCODER(
buffer, PROCEDURE_TRANSACTION_IDENTITY_MINIMUM_LENGTH, len);
if ((encode_result = encode_bstring(
proceduretransactionidentity, buffer + encoded, len - encoded)) < 0)
return encode_result;
else
encoded += encode_result;
ENCODE_U8(buffer + encoded, (uint8_t) proceduretransactionidentity, encoded);
return encoded;
/*
uint32_t encoded = 0;
uint8_t bitStream = 0x0;
CHECK_PDU_POINTER_AND_LENGTH_ENCODER (buffer,
PROCEDURE_TRANSACTION_IDENTITY_MINIMUM_LENGTH, len);
if(iei > 0){
bitStream = 0x00 | (iei & 0xf0) | (proceduretransactionidentity & 0x0f);
}
ENCODE_U8(buffer + encoded, bitStream, encoded);
return encoded;
*/
}
int decode_procedure_transaction_identity(
ProcedureTransactionIdentity* proceduretransactionidentity, uint8_t iei,
uint8_t* buffer, uint32_t len) {
int decoded = 0;
uint8_t ielen = 0;
int decode_result;
if ((decode_result = decode_bstring(
proceduretransactionidentity, ielen, buffer + decoded,
len - decoded)) < 0)
return decode_result;
else
decoded += decode_result;
int decoded = 0;
DECODE_U8(buffer + decoded, proceduretransactionidentity, decoded);
return decoded;
/*
int decoded = 0;
uint8_t bitStream = 0x0;
DECODE_U8(buffer + decoded, bitStream, decoded);
if(iei != (bitStream & 0xf0))
return -1;
*proceduretransactionidentity = bitStream & 0x0f;
return decoded;
*/
}
......@@ -20,12 +20,11 @@
*/
#include <stdint.h>
#include "bstrlib.h"
#define PROCEDURE_TRANSACTION_IDENTITY_MINIMUM_LENGTH 1
#define PROCEDURE_TRANSACTION_IDENTITY_MAXIMUM_LENGTH 1
typedef bstring ProcedureTransactionIdentity;
typedef uint8_t ProcedureTransactionIdentity;
int encode_procedure_transaction_identity(
ProcedureTransactionIdentity proceduretransactionidentity, uint8_t iei,
......
......@@ -3083,7 +3083,7 @@ bool smf_context::handle_pdu_session_update_sm_context_request(
sm_context_req_msg.get_pdu_session_id());
sm_context_rel_req_msg.set_snssai(sm_context_req_msg.get_snssai());
sm_context_rel_req_msg.set_dnn(sm_context_req_msg.get_dnn());
sm_context_rel_req_msg.set_pti(sm_context_req_msg.get_pti());
sm_context_rel_req_msg.set_pti(sm_context_resp_pending->res.get_pti());
// check if update message contain N2 SM info
if (sm_context_req_msg.n2_sm_info_is_set()) {
......
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