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/.
Max gerrit-no-reply at lists.osmocom.orgMax has uploaded this change for review. ( https://gerrit.osmocom.org/12221 Change subject: Use explicit parameter for sgsn_auth_init() ...................................................................... Use explicit parameter for sgsn_auth_init() This is necessary to properly test ACLs in follow-up patches. Change-Id: Ibeba371234680f33ad35afbfffce9dca185228c1 --- M include/osmocom/sgsn/gprs_sgsn.h M src/gprs/sgsn_auth.c M src/gprs/sgsn_main.c M tests/sgsn/sgsn_test.c 4 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/21/12221/1 diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h index cf78766..e82bf70 100644 --- a/include/osmocom/sgsn/gprs_sgsn.h +++ b/include/osmocom/sgsn/gprs_sgsn.h @@ -459,7 +459,7 @@ struct sgsn_instance; extern const struct value_string *sgsn_auth_state_names; -void sgsn_auth_init(void); +void sgsn_auth_init(struct sgsn_instance *sgsn); struct imsi_acl_entry *sgsn_acl_lookup(const char *imsi, struct sgsn_config *cfg); int sgsn_acl_add(const char *imsi, struct sgsn_config *cfg); int sgsn_acl_del(const char *imsi, struct sgsn_config *cfg); diff --git a/src/gprs/sgsn_auth.c b/src/gprs/sgsn_auth.c index e3d9127..3cf700a 100644 --- a/src/gprs/sgsn_auth.c +++ b/src/gprs/sgsn_auth.c @@ -38,7 +38,7 @@ const struct value_string *sgsn_auth_state_names = auth_state_names; -void sgsn_auth_init(void) +void sgsn_auth_init(struct sgsn_instance *sgsn) { INIT_LLIST_HEAD(&sgsn->cfg.imsi_acl); } diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index 1c76d6f..798e507 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -432,7 +432,7 @@ bssgp_vty_init(); gprs_llc_vty_init(); gprs_sndcp_vty_init(); - sgsn_auth_init(); + sgsn_auth_init(sgsn); sgsn_cdr_init(sgsn); /* FIXME: register signal handler for SS_L_NS */ diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index 111515e..4c0dc00 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -1632,6 +1632,7 @@ int main(int argc, char **argv) { + struct sgsn_instance *sgsn; void *osmo_sgsn_ctx; void *msgb_ctx; @@ -1639,9 +1640,11 @@ osmo_init_logging2(osmo_sgsn_ctx, &info); tall_sgsn_ctx = talloc_named_const(osmo_sgsn_ctx, 0, "sgsn"); msgb_ctx = msgb_talloc_ctx_init(osmo_sgsn_ctx, 0); + sgsn = sgsn_instance_alloc(osmo_sgsn_ctx); + sgsn_inst_init(sgsn); sgsn_rate_ctr_init(); - sgsn_auth_init(); + sgsn_auth_init(sgsn); gprs_subscr_init(sgsn); test_llme(); -- To view, visit https://gerrit.osmocom.org/12221 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibeba371234680f33ad35afbfffce9dca185228c1 Gerrit-Change-Number: 12221 Gerrit-PatchSet: 1 Gerrit-Owner: Max <msuraev at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181210/96b35bd2/attachment.htm>