[PATCH] osmo-sgsn[master]: tests: sgsn_test: Define wrap APIs with correct parameters

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Mon Jan 8 10:08:55 UTC 2018


Review at  https://gerrit.osmocom.org/5667

tests: sgsn_test: Define wrap APIs with correct parameters

Fixes following compilation warnings:

osmo-sgsn/tests/sgsn/sgsn_test.c: In function ‘test_gmm_attach_subscr’:
osmo-sgsn/tests/sgsn/sgsn_test.c:1110:30: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
  subscr_request_auth_info_cb = my_subscr_request_auth_info;
                              ^
osmo-sgsn/tests/sgsn/sgsn_test.c: In function ‘test_gmm_attach_subscr_fake_auth’:
osmo-sgsn/tests/sgsn/sgsn_test.c:1144:30: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
  subscr_request_auth_info_cb = my_subscr_request_auth_info_fake_auth;
                              ^
osmo-sgsn/tests/sgsn/sgsn_test.c: In function ‘test_gmm_attach_subscr_gsup_auth’:
osmo-sgsn/tests/sgsn/sgsn_test.c:1275:30: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
  subscr_request_auth_info_cb = my_subscr_request_auth_info_gsup_auth;
                              ^

Change-Id: I5fcb3d460d8becb4cc917fc8d27bfc7e49d50b90
---
M tests/sgsn/sgsn_test.c
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/67/5667/1

diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c
index 219587a..5743fce 100644
--- a/tests/sgsn/sgsn_test.c
+++ b/tests/sgsn/sgsn_test.c
@@ -1095,7 +1095,9 @@
 	return rc;
 };
 
-int my_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx) {
+int my_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx, const uint8_t *auts,
+				const uint8_t *auts_rand)
+{
 	gprs_subscr_update(mmctx->subscr);
 	return 0;
 };
@@ -1124,7 +1126,8 @@
 	cleanup_test();
 }
 
-int my_subscr_request_auth_info_fake_auth(struct sgsn_mm_ctx *mmctx)
+int my_subscr_request_auth_info_fake_auth(struct sgsn_mm_ctx *mmctx, const uint8_t *auts,
+						const uint8_t *auts_rand)
 {
 	/* Fake an authentication */
 	OSMO_ASSERT(mmctx->subscr);
@@ -1210,7 +1213,8 @@
 static int auth_info_skip = 0;
 static int upd_loc_skip = 0;
 
-int my_subscr_request_auth_info_gsup_auth(struct sgsn_mm_ctx *mmctx)
+int my_subscr_request_auth_info_gsup_auth(struct sgsn_mm_ctx *mmctx, const uint8_t *auts,
+						const uint8_t *auts_rand)
 {
 	static const uint8_t send_auth_info_res[] = {
 		0x0a,
@@ -1320,7 +1324,7 @@
 
 	case OSMO_GSUP_MSGT_SEND_AUTH_INFO_REQUEST:
 		/* Send SEND_AUTH_INFO_RESULT */
-		return my_subscr_request_auth_info_gsup_auth(NULL);
+		return my_subscr_request_auth_info_gsup_auth(NULL, NULL, NULL);
 
 	case OSMO_GSUP_MSGT_PURGE_MS_REQUEST:
 		from_peer.message_type = OSMO_GSUP_MSGT_PURGE_MS_RESULT;

-- 
To view, visit https://gerrit.osmocom.org/5667
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5fcb3d460d8becb4cc917fc8d27bfc7e49d50b90
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list