From 1e277db2cc69d676893558998bff8ddb8d93ec16 Mon Sep 17 00:00:00 2001 From: Neels Janosch Hofmeyr Date: Thu, 23 Feb 2023 01:17:11 +0100 Subject: [PATCH] fix deprecation: use ranap_cn_rx_co_decode2() Change-Id: I867cbf174beab1eefddc682c1420737e49f9e50d --- src/osmo-hnbgw/hnbgw_rua.c | 4 ++-- tests/ranap_rab_ass/ranap_rab_ass_test.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c index 3af0ad6..6ef7d30 100644 --- a/src/osmo-hnbgw/hnbgw_rua.c +++ b/src/osmo-hnbgw/hnbgw_rua.c @@ -278,7 +278,7 @@ static int rua_to_scu(struct hnb_context *hnb, if (data && len && map && !release_context_map) { if (!map->is_ps) { message = talloc_zero(map, ranap_message); - rc = ranap_cn_rx_co_decode(map, message, msgb_l2(prim->oph.msg), msgb_l2len(prim->oph.msg)); + rc = ranap_cn_rx_co_decode2(message, msgb_l2(prim->oph.msg), msgb_l2len(prim->oph.msg)); if (rc == 0) { switch (message->procedureCode) { @@ -294,7 +294,7 @@ static int rua_to_scu(struct hnb_context *hnb, } else if (hnb_gw_is_gtp_mapping_enabled(hnb->gw)) { /* map->is_ps == true and PFCP is enabled in osmo-hnbgw.cfg */ message = talloc_zero(map, ranap_message); - rc = ranap_cn_rx_co_decode(map, message, msgb_l2(prim->oph.msg), msgb_l2len(prim->oph.msg)); + rc = ranap_cn_rx_co_decode2(message, msgb_l2(prim->oph.msg), msgb_l2len(prim->oph.msg)); if (rc == 0) { switch (message->procedureCode) { diff --git a/tests/ranap_rab_ass/ranap_rab_ass_test.c b/tests/ranap_rab_ass/ranap_rab_ass_test.c index f4e7999..03b0836 100644 --- a/tests/ranap_rab_ass/ranap_rab_ass_test.c +++ b/tests/ranap_rab_ass/ranap_rab_ass_test.c @@ -86,7 +86,7 @@ void test_ranap_rab_ass_resp_decode_encode(void) }; uint8_t encoded[sizeof(testvec)]; - rc = ranap_cn_rx_co_decode(talloc_asn1_ctx, &message, testvec, sizeof(testvec)); + rc = ranap_cn_rx_co_decode2(&message, testvec, sizeof(testvec)); OSMO_ASSERT(rc == 0); rc = ranap_rab_ass_resp_encode(encoded, sizeof(encoded), &message.msg.raB_AssignmentResponseIEs); @@ -145,7 +145,7 @@ void test_ranap_rab_ass_resp_ies_extract_inet_addr(void) 0x00, 0x40, 0x04, 0x0a, 0x00, 0x00 }; - rc = ranap_cn_rx_co_decode(talloc_asn1_ctx, &message, testvec, sizeof(testvec)); + rc = ranap_cn_rx_co_decode2(&message, testvec, sizeof(testvec)); OSMO_ASSERT(rc == 0); rc = ranap_rab_ass_resp_ies_extract_inet_addr(&addr, &message.msg.raB_AssignmentResponseIEs, 7); osmo_sockaddr_str_from_sockaddr(&addr_str, &addr.u.sas); @@ -245,7 +245,7 @@ void test_ranap_rab_ass_resp_ies_replace_inet_addr(void) 0x00, 0x40, 0x04, 0xd2, 0x00, 0x00 }; - rc = ranap_cn_rx_co_decode(talloc_asn1_ctx, &message, testvec_in, sizeof(testvec_in)); + rc = ranap_cn_rx_co_decode2(&message, testvec_in, sizeof(testvec_in)); OSMO_ASSERT(rc == 0); rc = ranap_rab_ass_resp_ies_extract_inet_addr(&addr, &message.msg.raB_AssignmentResponseIEs, 6); @@ -285,7 +285,7 @@ void test_ranap_rab_ass_resp_ies_check_failure(void) 0x40, 0x03, 0x05, 0xd0, 0x00 }; - rc = ranap_cn_rx_co_decode(talloc_asn1_ctx, &message, testvec, sizeof(testvec)); + rc = ranap_cn_rx_co_decode2(&message, testvec, sizeof(testvec)); OSMO_ASSERT(rc == 0); rab_failed_at_hnb =