From b1753948399767c1854f14df9c396dbfc744615e Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 30 Aug 2022 16:38:18 +0200 Subject: [PATCH] [SMF] fixup send 3GPP-Charging-Characteristics on Gx if received on S5/8c - Gy instead of Gx AVP was used. - Use correct avp position and avp variables. Fixes: 657eef9169af ("[SMF] send 3GPP-Charging-Characteristics on Gx if received on S5/8c") --- src/smf/gx-path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/smf/gx-path.c b/src/smf/gx-path.c index 487868fb3..20c816082 100644 --- a/src/smf/gx-path.c +++ b/src/smf/gx-path.c @@ -543,7 +543,7 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact, sess->gtp.charging_characteristics.len > 0) { uint8_t oct1, oct2; char digits[5]; - ret = fd_msg_avp_new(ogs_diam_gy_3gpp_charging_characteristics, 0, &avpch2); + ret = fd_msg_avp_new(ogs_diam_gx_3gpp_charging_characteristics, 0, &avp); ogs_assert(ret == 0); oct1 = ((uint8_t*)sess->gtp.charging_characteristics.data)[0]; oct2 = (sess->gtp.charging_characteristics.len > 1) ? @@ -551,9 +551,9 @@ void smf_gx_send_ccr(smf_sess_t *sess, ogs_gtp_xact_t *xact, ogs_snprintf(digits, sizeof(digits), "%02x%02x", oct1, oct2); val.os.data = (uint8_t*)&digits[0]; val.os.len = 4; - ret = fd_msg_avp_setvalue(avpch2, &val); + ret = fd_msg_avp_setvalue(avp, &val); ogs_assert(ret == 0); - ret = fd_msg_avp_add(avpch1, MSG_BRW_LAST_CHILD, avpch2); + ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); ogs_assert(ret == 0); }