Commit 1b1a7ea9 authored by liuyu's avatar liuyu

complete json

parent 0bfbd32a
......@@ -581,7 +581,7 @@ void amf_n2::handle_itti_message(itti_ng_reset& itti_msg) {
{
nlohmann::json aggregation = {};
std::string hex_str;
for (int i = 0; i < BUFFER_SIZE_1024; ++i) {
for (int i = 0; i < BUFFER_SIZE_512; ++i) {
char hex[3];
snprintf(hex, sizeof(hex), "%02X", buffer[i]);
hex_str += hex;
......@@ -1064,7 +1064,7 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
{
nlohmann::json aggregation = {};
std::string hex_str;
for (int i = 0; i < BUFFER_SIZE_1024; ++i) {
for (int i = 0; i < BUFFER_SIZE_2048; ++i) {
char hex[3];
snprintf(hex, sizeof(hex), "%02X", buffer[i]);
hex_str += hex;
......@@ -1169,7 +1169,7 @@ void amf_n2::handle_itti_message(
{
nlohmann::json aggregation = {};
std::string hex_str;
for (int i = 0; i < BUFFER_SIZE_1024; ++i) {
for (int i = 0; i < BUFFER_SIZE_4096; ++i) {
char hex[3];
snprintf(hex, sizeof(hex), "%02X", buffer[i]);
hex_str += hex;
......@@ -1254,7 +1254,7 @@ void amf_n2::handle_itti_message(
{
nlohmann::json aggregation = {};
std::string hex_str;
for (int i = 0; i < BUFFER_SIZE_1024; ++i) {
for (int i = 0; i < BUFFER_SIZE_4096; ++i) {
char hex[3];
snprintf(hex, sizeof(hex), "%02X", buffer[i]);
hex_str += hex;
......@@ -1329,7 +1329,7 @@ void amf_n2::handle_itti_message(
{
nlohmann::json aggregation = {};
std::string hex_str;
for (int i = 0; i < BUFFER_SIZE_1024; ++i) {
for (int i = 0; i < BUFFER_SIZE_4096; ++i) {
char hex[3];
snprintf(hex, sizeof(hex), "%02X", buffer[i]);
hex_str += hex;
......@@ -1373,7 +1373,7 @@ void amf_n2::handle_itti_message(itti_ue_context_release_request& itti_msg) {
{
nlohmann::json aggregation = {};
std::string hex_str;
for (int i = 0; i < BUFFER_SIZE_1024; ++i) {
for (int i = 0; i < BUFFER_SIZE_512; ++i) {
char hex[3];
snprintf(hex, sizeof(hex), "%02X", buffer[i]);
hex_str += hex;
......@@ -1440,7 +1440,7 @@ void amf_n2::handle_itti_message(itti_ue_context_release_command& itti_msg) {
{
nlohmann::json aggregation = {};
std::string hex_str;
for (int i = 0; i < BUFFER_SIZE_1024; ++i) {
for (int i = 0; i < BUFFER_SIZE_256; ++i) {
char hex[3];
snprintf(hex, sizeof(hex), "%02X", buffer[i]);
hex_str += hex;
......
......@@ -181,8 +181,7 @@ void udp_server::handle_receive_udp(int r,uint8_t udp_recv[]){
Logger::ngap().debug("Satellite AMF had gNB context with assoc_id (%d)", assoc_id);
}
// 同步uengapcontxt,建立ranid,gnbid与uengapcontext关系/
uint32_t ran_ue_ngap_id = 0;
// ran_ue_ngap_id = udp_recv[r-2];
uint32_t ran_ue_ngap_id = aggregation["ran_ue_ngap_id"];
std::shared_ptr<ue_ngap_context> unc = {};
if (!amf_n2_inst->ran_ue_id_2_ue_ngap_context(ran_ue_ngap_id, gc->gnb_id, unc)) {
Logger::amf_n2().debug("Create a new UE NGAP context with ran_ue_ngap_id " GNB_UE_NGAP_ID_FMT,ran_ue_ngap_id);
......@@ -196,7 +195,7 @@ void udp_server::handle_receive_udp(int r,uint8_t udp_recv[]){
// 同步nascontext,建立uengapid与naxcontext关系。
std::shared_ptr<nas_context> nc = {};
long amf_ue_ngap_id;
// amf_ue_ngap_id = udp_recv[r-2];
amf_ue_ngap_id = aggregation["amf_ue_ngap_id"];
if (amf_n1_inst->amf_ue_id_2_nas_context(amf_ue_ngap_id, nc)) {
Logger::amf_n1().debug("Find nas_context by amf_ue_ngap_id (" AMF_UE_NGAP_ID_FMT ")",amf_ue_ngap_id);
} else {
......
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