neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31460 )
Change subject: fix deprecation: use ranap_cn_rx_co_decode2() ......................................................................
fix deprecation: use ranap_cn_rx_co_decode2()
Change-Id: I867cbf174beab1eefddc682c1420737e49f9e50d --- M src/osmo-hnbgw/hnbgw_rua.c M tests/ranap_rab_ass/ranap_rab_ass_test.c 2 files changed, 15 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/60/31460/1
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 @@ 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 @@ } 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 @@ }; 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 @@ 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 @@ 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 @@ 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 =