From cca53fb8e839774f3d7dba08877034e033f33196 Mon Sep 17 00:00:00 2001 From: Sukchan Lee Date: Sun, 30 Oct 2022 13:35:25 +0900 Subject: [PATCH] SCP had a serioud memory problem and fixed it --- lib/sbi/nf-sm.c | 6 ++++-- src/scp/sbi-path.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/sbi/nf-sm.c b/lib/sbi/nf-sm.c index 9be81cc62..f52539b41 100644 --- a/lib/sbi/nf-sm.c +++ b/lib/sbi/nf-sm.c @@ -301,8 +301,10 @@ void ogs_sbi_nf_state_registered(ogs_fsm_t *s, ogs_event_t *e) break; case OGS_TIMER_NF_INSTANCE_NO_HEARTBEAT: - ogs_error("[%s] No heartbeat", - NF_INSTANCE_ID(ogs_sbi_self()->nf_instance)); + ogs_error("[%s:%s] No heartbeat", + NF_INSTANCE_ID(ogs_sbi_self()->nf_instance), + OpenAPI_nf_type_ToString( + NF_INSTANCE_TYPE(ogs_sbi_self()->nf_instance))); OGS_FSM_TRAN(s, &ogs_sbi_nf_state_will_register); break; diff --git a/src/scp/sbi-path.c b/src/scp/sbi-path.c index da7b2ea99..c15460fa7 100644 --- a/src/scp/sbi-path.c +++ b/src/scp/sbi-path.c @@ -379,7 +379,7 @@ static int request_handler(ogs_sbi_request_t *request, void *data) v_start = v_end = NULL; - while (*p++) { + while (*p) { if (*p == ';') { if ((v_start && v_end) || !v_start) { p++; @@ -389,6 +389,7 @@ static int request_handler(ogs_sbi_request_t *request, void *data) if (!v_start) v_start = p+1; else if (!v_end) v_end = p; } + p++; } if (v_start && v_end) {