diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-08-16 11:30:01 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-08-16 11:30:03 +0200 |
commit | 5e297458845b848abf2f31dfe5d462cb2288d97f (patch) | |
tree | af37a85c6aa54197510b6efb1f651c7db617695d | |
parent | e6222ef1acc9947dba82898a2371f48e4f3848e1 (diff) |
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
-rw-r--r-- | openbsc/tests/sgsn/sgsn_test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openbsc/tests/sgsn/sgsn_test.c b/openbsc/tests/sgsn/sgsn_test.c index 2f1513a29..d66c5dd84 100644 --- a/openbsc/tests/sgsn/sgsn_test.c +++ b/openbsc/tests/sgsn/sgsn_test.c @@ -139,12 +139,12 @@ int __wrap_gprs_subscr_request_update_location(struct sgsn_mm_ctx *mmctx) { }; /* 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 @@ static void test_gmm_attach_subscr_fake_auth(void) 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}, |