osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-iuh/+/30085 )
Change subject: tests/hnb-test-rua: fix incompat pointer type ......................................................................
tests/hnb-test-rua: fix incompat pointer type
Adjust the first argument of hnb_test_rua_dt_handle_ranap and hnb_test_rua_cl_handle_ranap to be "void *priv", as it is private user data.
Fix for: ../../../../src/osmo-iuh/src/tests/hnb-test-rua.c:19:29: error: passing argument 1 of ‘ranap_cn_rx_co’ from incompatible pointer type [-Werror=incompatible-pointer-types] 19 | rc = ranap_cn_rx_co(hnb_test_rua_dt_handle_ranap, hnb, ies.ranaP_Message.buf, ies.ranaP_Message.size); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | void (*)(struct hnb_test *, struct ranap_message_s *)
Change-Id: Id930a7f0d3d05cfcc8ba9734dd922de885853c8c --- M src/tests/hnb-test-layers.h M src/tests/hnb-test-ranap.c 2 files changed, 6 insertions(+), 8 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved laforge: Looks good to me, approved
diff --git a/src/tests/hnb-test-layers.h b/src/tests/hnb-test-layers.h index 62369f3..6211661 100644 --- a/src/tests/hnb-test-layers.h +++ b/src/tests/hnb-test-layers.h @@ -9,10 +9,8 @@ void hnb_test_rua_cl_handle(struct hnb_test *hnb, struct ANY *in);
/* RUA calls RANAP */ -void hnb_test_rua_dt_handle_ranap(struct hnb_test *hnb, - struct ranap_message_s *ranap_msg); -void hnb_test_rua_cl_handle_ranap(struct hnb_test *hnb, - struct ranap_message_s *ranap_msg); +void hnb_test_rua_dt_handle_ranap(void *priv, struct ranap_message_s *ranap_msg); +void hnb_test_rua_cl_handle_ranap(void *priv, struct ranap_message_s *ranap_msg);
/* RANAP calls main with actual payload*/ void hnb_test_nas_rx_dtap(struct hnb_test *hnb, void *data, int len); diff --git a/src/tests/hnb-test-ranap.c b/src/tests/hnb-test-ranap.c index 629726b..fad5b8f 100644 --- a/src/tests/hnb-test-ranap.c +++ b/src/tests/hnb-test-ranap.c @@ -13,13 +13,13 @@ printf(#octet_string_t " = %s\n",\ printstr(&octet_string_t))
-void hnb_test_rua_dt_handle_ranap(struct hnb_test *hnb, - struct ranap_message_s *ranap_msg) +void hnb_test_rua_dt_handle_ranap(void *priv, struct ranap_message_s *ranap_msg) { int len; uint8_t *data; RANAP_PermittedIntegrityProtectionAlgorithms_t *algs; RANAP_IntegrityProtectionAlgorithm_t *first_alg; + struct hnb_test *hnb = priv;
printf("rx ranap_msg->procedureCode %d\n", ranap_msg->procedureCode); @@ -58,10 +58,10 @@ } }
-void hnb_test_rua_cl_handle_ranap(struct hnb_test *hnb, - struct ranap_message_s *ranap_msg) +void hnb_test_rua_cl_handle_ranap(void *priv, struct ranap_message_s *ranap_msg) { char imsi[16]; + struct hnb_test *hnb = priv;
printf("rx ranap_msg->procedureCode %d\n", ranap_msg->procedureCode);
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.