fix deprecation: use ranap_cn_rx_co_decode2()

Change-Id: I867cbf174beab1eefddc682c1420737e49f9e50d
This commit is contained in:
Neels Hofmeyr 2023-02-23 01:17:11 +01:00
parent 60a52e4121
commit 1e277db2cc
2 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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 =