diff options
-rw-r--r-- | openbsc/include/openbsc/gprs_sgsn.h | 4 | ||||
-rw-r--r-- | openbsc/include/openbsc/sgsn.h | 1 | ||||
-rw-r--r-- | openbsc/src/gprs/sgsn_libgtp.c | 3 | ||||
-rw-r--r-- | openbsc/src/gprs/sgsn_main.c | 4 |
4 files changed, 4 insertions, 8 deletions
diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index f70c6bed2..b9ed1b29e 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -24,15 +24,11 @@ enum gprs_ciph_algo { #define MS_RADIO_ACCESS_CAPA -struct sgsn_instance; - /* According to TS 03.60, Table 5: SGSN MM and PDP Contexts */ /* Extended by 3GPP TS 23.060, Table 6: SGSN MM and PDP Contexts */ struct sgsn_mm_ctx { struct llist_head list; - struct sgsn_instance *sgsn; - char imsi[GSM_IMSI_LENGTH]; enum gprs_mm_state mm_state; uint32_t p_tmsi; diff --git a/openbsc/include/openbsc/sgsn.h b/openbsc/include/openbsc/sgsn.h index 2c4378bca..b2625dbac 100644 --- a/openbsc/include/openbsc/sgsn.h +++ b/openbsc/include/openbsc/sgsn.h @@ -32,6 +32,7 @@ struct sgsn_instance { struct gsn_t *gsn; }; +extern struct sgsn_instance *sgsn; /* sgsn_vty.c */ diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index fcaee8bbb..e99cb6cc8 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -99,7 +99,6 @@ const struct value_string gtp_cause_strs[] = { int sgsn_create_pdp_ctx(struct ggsn_ctx *ggsn, struct sgsn_mm_ctx *mmctx, uint16_t nsapi, struct tlv_parsed *tp) { - struct sgsn_instance *sgsn = mmctx->sgsn; struct pdp_t *pdp; uint64_t imsi_ui64; int rc; @@ -184,7 +183,7 @@ static int create_pdp_conf(struct pdp_t *pdp, void *cbp, int cause) LOGP(DGPRS, LOGL_NOTICE, "Create PDP ctx req timed out\n"); if (pdp->version == 1) { pdp->version = 0; - gtp_create_context_req(mmctx->sgsn->gsn, pdp, cbp); + gtp_create_context_req(sgsn->gsn, pdp, cbp); return 0; } else { pdp_freepdp(pdp); diff --git a/openbsc/src/gprs/sgsn_main.c b/openbsc/src/gprs/sgsn_main.c index ac895a2ce..74efe8418 100644 --- a/openbsc/src/gprs/sgsn_main.c +++ b/openbsc/src/gprs/sgsn_main.c @@ -59,19 +59,19 @@ void subscr_put() { abort(); } void *tall_bsc_ctx; struct gprs_ns_inst *sgsn_nsi; - const char *openbsc_copyright = "Copyright (C) 2010 Harald Welte and On-Waves\n" "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n"; -struct sgsn_instance sgsn_inst = { +static struct sgsn_instance sgsn_inst = { .config_file = "osmo_sgsn.cfg", .cfg = { .gtp_statedir = "./", }, }; +struct sgsn_instance *sgsn = &sgsn_inst; /* call-back function for the NS protocol */ static int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc, |