From 9c773014b0c863a8b4c05501d767f4388ce90054 Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Mon, 21 Sep 2020 23:07:08 -0400 Subject: [PATCH] Fix the more bug --- lib/app/ogs-context.c | 7 +++---- src/amf/ngap-handler.c | 14 +++++++------- src/sgwc/sxa-handler.c | 5 +++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/app/ogs-context.c b/lib/app/ogs-context.c index d564e3d60..673665539 100644 --- a/lib/app/ogs-context.c +++ b/lib/app/ogs-context.c @@ -77,12 +77,11 @@ static void recalculate_pool_size(void) #define MAX_NUM_OF_SOCKET 4 /* Num of socket per NF */ self.pool.socket = self.pool.nf * MAX_NUM_OF_SOCKET; -#define MAX_GTP_XACT_POOL 512 - self.pool.gtp_xact = MAX_GTP_XACT_POOL; +#define MAX_NUM_OF_XACT 8 + self.pool.gtp_xact = self.max.ue * MAX_NUM_OF_XACT; self.pool.gtp_node = self.pool.nf; -#define MAX_PFCP_XACT_POOL 512 - self.pool.pfcp_xact = MAX_PFCP_XACT_POOL; + self.pool.pfcp_xact = self.max.ue * MAX_NUM_OF_XACT; self.pool.pfcp_node = self.pool.nf; #define MAX_NUM_OF_NF_SERVICE 16 /* Num of NF Service per NF Instance */ diff --git a/src/amf/ngap-handler.c b/src/amf/ngap-handler.c index 5d44e01f0..d5e8face2 100644 --- a/src/amf/ngap-handler.c +++ b/src/amf/ngap-handler.c @@ -760,7 +760,7 @@ void ngap_handle_initial_context_setup_response( return; amf_ue = ran_ue->amf_ue; - ogs_assert(amf_ue); + ogs_expect(amf_ue); for (i = 0; i < PDUSessionList->list.count; i++) { amf_sess_t *sess = NULL; @@ -985,7 +985,7 @@ void ngap_handle_ue_context_modification_response( ran_ue = ran_ue_find_by_ran_ue_ngap_id(gnb, *RAN_UE_NGAP_ID); ogs_assert(ran_ue); amf_ue = ran_ue->amf_ue; - ogs_assert(amf_ue); + ogs_expect(amf_ue); ogs_debug(" RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%d]", ran_ue->ran_ue_ngap_id, ran_ue->amf_ue_ngap_id); @@ -1054,7 +1054,7 @@ void ngap_handle_ue_context_modification_failure( cleanup: amf_ue = ran_ue->amf_ue; - ogs_assert(amf_ue); + ogs_expect(amf_ue); CLEAR_SERVICE_INDICATOR(amf_ue); } #endif @@ -1781,7 +1781,7 @@ void ngap_handle_path_switch_request( ran_ue->ran_ue_ngap_id, ran_ue->amf_ue_ngap_id); amf_ue = ran_ue->amf_ue; - ogs_assert(amf_ue); + ogs_expect(amf_ue); if (SECURITY_CONTEXT_IS_VALID(amf_ue)) { amf_ue->nhcc++; @@ -2047,7 +2047,7 @@ void ngap_handle_handover_required(amf_gnb_t *gnb, ogs_ngap_message_t *message) source_ue->ran_ue_ngap_id, source_ue->amf_ue_ngap_id); amf_ue = source_ue->amf_ue; - ogs_assert(amf_ue); + ogs_expect(amf_ue); if (SECURITY_CONTEXT_IS_VALID(amf_ue)) { amf_ue->nhcc++; @@ -2136,7 +2136,7 @@ void ngap_handle_handover_request_ack(amf_gnb_t *gnb, ogs_ngap_message_t *messag source_ue = target_ue->source_ue; ogs_assert(source_ue); amf_ue = source_ue->amf_ue; - ogs_assert(amf_ue); + ogs_expect(amf_ue); ogs_debug(" Source : RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%d]", source_ue->ran_ue_ngap_id, source_ue->amf_ue_ngap_id); @@ -2481,7 +2481,7 @@ void ngap_handle_handover_notification(amf_gnb_t *gnb, ogs_ngap_message_t *messa source_ue = target_ue->source_ue; ogs_assert(source_ue); amf_ue = source_ue->amf_ue; - ogs_assert(amf_ue); + ogs_expect(amf_ue); ogs_debug(" Source : RAN_UE_NGAP_ID[%d] AMF_UE_NGAP_ID[%d]", source_ue->ran_ue_ngap_id, source_ue->amf_ue_ngap_id); diff --git a/src/sgwc/sxa-handler.c b/src/sgwc/sxa-handler.c index 758ebe686..281be7c46 100644 --- a/src/sgwc/sxa-handler.c +++ b/src/sgwc/sxa-handler.c @@ -248,8 +248,6 @@ void sgwc_sxa_handle_session_modification_response( flags = pfcp_xact->modify_flags; ogs_assert(flags); - ogs_pfcp_xact_commit(pfcp_xact); - cause_value = OGS_GTP_CAUSE_REQUEST_ACCEPTED; if (!sess) { @@ -314,6 +312,7 @@ void sgwc_sxa_handle_session_modification_response( OGS_GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE, cause_value); } + ogs_pfcp_xact_commit(pfcp_xact); return; } @@ -786,6 +785,8 @@ void sgwc_sxa_handle_session_modification_response( ogs_fatal("Invalid modify_flags[0x%llx]", (long long)flags); ogs_assert_if_reached(); } + + ogs_pfcp_xact_commit(pfcp_xact); } void sgwc_sxa_handle_session_deletion_response(