[MERGED] osmo-msc[master]: sgsn_test: Fix wrong definition of wrap func

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sun Aug 27 00:34:47 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: sgsn_test: Fix wrong definition of wrap func
......................................................................


sgsn_test: Fix wrong definition of wrap func

Commit 058cd573d8 added 2 new pointer parameters to
gprs_subscr_request_auth_info, but forgot to update wraps of the
function in sgsn_test.

I catched this today because openbsc build test sgsn_test was failing.
Closed look up to the logs showed:
Assert failed (auts != NULL) == (auts_rand != NULL) openbsc/openbsc/src/gprs/gprs_subscriber.c:791

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

Approvals:
  Neels Hofmeyr: Looks good to me, approved



diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c
index 2f1513a..d66c5dd 100644
--- a/tests/sgsn/sgsn_test.c
+++ b/tests/sgsn/sgsn_test.c
@@ -139,12 +139,12 @@
 };
 
 /* override, requires '-Wl,--wrap=gprs_subscr_request_auth_info' */
-int __real_gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx);
-int (*subscr_request_auth_info_cb)(struct sgsn_mm_ctx *mmctx) =
+int __real_gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand);
+int (*subscr_request_auth_info_cb)(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand) =
 	&__real_gprs_subscr_request_auth_info;
 
-int __wrap_gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx) {
-	return (*subscr_request_auth_info_cb)(mmctx);
+int __wrap_gprs_subscr_request_auth_info(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand) {
+	return (*subscr_request_auth_info_cb)(mmctx, auts, auts_rand);
 };
 
 /* override, requires '-Wl,--wrap=gsup_client_send' */
@@ -1160,7 +1160,7 @@
 	cleanup_test();
 }
 
-int my_subscr_request_auth_info_real_auth(struct sgsn_mm_ctx *mmctx)
+int my_subscr_request_auth_info_real_auth(struct sgsn_mm_ctx *mmctx, const uint8_t *auts, const uint8_t *auts_rand)
 {
 	struct gsm_auth_tuple at = {
 		.vec.sres = {0x51, 0xe5, 0x51, 0xe5},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9e4af6da0339536fb20ca0b7bbcf6f485bd522c
Gerrit-PatchSet: 2
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>



More information about the gerrit-log mailing list