diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-10-30 17:27:59 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-10-30 17:35:31 +0100 |
commit | b1d1c240dbfe6a065fd489c38e2e8563ff2d747c (patch) | |
tree | 98b83617f88e734c542c05884d96b0fc383cfc31 /src | |
parent | e64f0ef1f6a5cca0c77dfb5966b295aa37202e5e (diff) |
Update wrong references to bsc in sgsn code
Change-Id: I93f0dc721c2eff8a87fb9248882f24768f708713
Diffstat (limited to 'src')
-rw-r--r-- | src/gprs/gb_proxy.c | 4 | ||||
-rw-r--r-- | src/gprs/gb_proxy_main.c | 22 | ||||
-rw-r--r-- | src/gprs/gb_proxy_patch.c | 4 | ||||
-rw-r--r-- | src/gprs/gb_proxy_peer.c | 4 | ||||
-rw-r--r-- | src/gprs/gprs_gmm.c | 4 | ||||
-rw-r--r-- | src/gprs/gprs_sgsn.c | 14 | ||||
-rw-r--r-- | src/gprs/gprs_subscriber.c | 4 | ||||
-rw-r--r-- | src/gprs/gsup_client.c | 4 | ||||
-rw-r--r-- | src/gprs/gtphub_main.c | 2 | ||||
-rw-r--r-- | src/gprs/gtphub_vty.c | 4 | ||||
-rw-r--r-- | src/gprs/sgsn_ares.c | 6 | ||||
-rw-r--r-- | src/gprs/sgsn_main.c | 28 | ||||
-rw-r--r-- | src/gprs/sgsn_vty.c | 4 |
13 files changed, 52 insertions, 52 deletions
diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c index 8bb67895e..fe6a6c64f 100644 --- a/src/gprs/gb_proxy.c +++ b/src/gprs/gb_proxy.c @@ -50,7 +50,7 @@ #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> #include <osmocom/sgsn/gprs_utils.h> -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; static const struct rate_ctr_desc global_ctr_description[] = { { "inv-bvci", "Invalid BVC Identifier " }, @@ -1447,7 +1447,7 @@ int gbproxy_init_config(struct gbproxy_config *cfg) struct timespec tp; INIT_LLIST_HEAD(&cfg->bts_peers); - cfg->ctrg = rate_ctr_group_alloc(tall_bsc_ctx, &global_ctrg_desc, 0); + cfg->ctrg = rate_ctr_group_alloc(tall_sgsn_ctx, &global_ctrg_desc, 0); if (!cfg->ctrg) { LOGP(DGPRS, LOGL_ERROR, "Cannot allocate global counter group!\n"); return -1; diff --git a/src/gprs/gb_proxy_main.c b/src/gprs/gb_proxy_main.c index 97e634206..19fbbba8f 100644 --- a/src/gprs/gb_proxy_main.c +++ b/src/gprs/gb_proxy_main.c @@ -62,7 +62,7 @@ #define _GNU_SOURCE #include <getopt.h> -void *tall_bsc_ctx; +void *tall_sgsn_ctx; const char *openbsc_copyright = "Copyright (C) 2010 Harald Welte and On-Waves\r\n" @@ -116,7 +116,7 @@ static void signal_handler(int signal) * and then return to the caller, who will abort the process */ case SIGUSR1: talloc_report(tall_vty_ctx, stderr); - talloc_report_full(tall_bsc_ctx, stderr); + talloc_report_full(tall_sgsn_ctx, stderr); break; case SIGUSR2: talloc_report_full(tall_vty_ctx, stderr); @@ -269,9 +269,9 @@ int main(int argc, char **argv) int rc; struct ctrl_handle *ctrl; - tall_bsc_ctx = talloc_named_const(NULL, 0, "nsip_proxy"); - msgb_talloc_ctx_init(tall_bsc_ctx, 0); - vty_info.tall_ctx = tall_bsc_ctx; + tall_sgsn_ctx = talloc_named_const(NULL, 0, "nsip_proxy"); + msgb_talloc_ctx_init(tall_sgsn_ctx, 0); + vty_info.tall_ctx = tall_sgsn_ctx; signal(SIGINT, &signal_handler); signal(SIGTERM, &signal_handler); @@ -280,7 +280,7 @@ int main(int argc, char **argv) signal(SIGUSR2, &signal_handler); osmo_init_ignore_signals(); - osmo_init_logging2(tall_bsc_ctx, &gprs_log_info); + osmo_init_logging2(tall_sgsn_ctx, &gprs_log_info); vty_info.copyright = openbsc_copyright; vty_init(&vty_info); @@ -306,16 +306,16 @@ int main(int argc, char **argv) config_file = CONFIG_FILE_DEFAULT; } - rate_ctr_init(tall_bsc_ctx); - osmo_stats_init(tall_bsc_ctx); + rate_ctr_init(tall_sgsn_ctx); + osmo_stats_init(tall_sgsn_ctx); - bssgp_nsi = gprs_ns_instantiate(&proxy_ns_cb, tall_bsc_ctx); + bssgp_nsi = gprs_ns_instantiate(&proxy_ns_cb, tall_sgsn_ctx); if (!bssgp_nsi) { LOGP(DGPRS, LOGL_ERROR, "Unable to instantiate NS\n"); exit(1); } - gbcfg = talloc_zero(tall_bsc_ctx, struct gbproxy_config); + gbcfg = talloc_zero(tall_sgsn_ctx, struct gbproxy_config); if (!gbcfg) { LOGP(DGPRS, LOGL_FATAL, "Unable to allocate config\n"); exit(1); @@ -334,7 +334,7 @@ int main(int argc, char **argv) } /* start telnet after reading config for vty_get_bind_addr() */ - rc = telnet_init_dynif(tall_bsc_ctx, NULL, + rc = telnet_init_dynif(tall_sgsn_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_GBPROXY); if (rc < 0) exit(1); diff --git a/src/gprs/gb_proxy_patch.c b/src/gprs/gb_proxy_patch.c index 9cca9a863..251bb67d6 100644 --- a/src/gprs/gb_proxy_patch.c +++ b/src/gprs/gb_proxy_patch.c @@ -29,7 +29,7 @@ #include <osmocom/core/rate_ctr.h> #include <osmocom/gsm/apn.h> -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; /* patch RA identifier in place */ static void gbproxy_patch_raid(struct gsm48_ra_id *raid_enc, struct gbproxy_peer *peer, @@ -420,7 +420,7 @@ int gbproxy_set_patch_filter(struct gbproxy_match *match, const char *filter, if (rc == 0) { match->enable = 1; - match->re_str = talloc_strdup(tall_bsc_ctx, filter); + match->re_str = talloc_strdup(tall_sgsn_ctx, filter); return 0; } diff --git a/src/gprs/gb_proxy_peer.c b/src/gprs/gb_proxy_peer.c index a862a832b..48482b6a1 100644 --- a/src/gprs/gb_proxy_peer.c +++ b/src/gprs/gb_proxy_peer.c @@ -32,7 +32,7 @@ #include <string.h> -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; static const struct rate_ctr_desc peer_ctr_description[] = { { "blocked", "BVC Block " }, @@ -185,7 +185,7 @@ struct gbproxy_peer *gbproxy_peer_alloc(struct gbproxy_config *cfg, uint16_t bvc { struct gbproxy_peer *peer; - peer = talloc_zero(tall_bsc_ctx, struct gbproxy_peer); + peer = talloc_zero(tall_sgsn_ctx, struct gbproxy_peer); if (!peer) return NULL; diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c index a0221ea8b..cc6ea4a2f 100644 --- a/src/gprs/gprs_gmm.c +++ b/src/gprs/gprs_gmm.c @@ -68,7 +68,7 @@ #define PTMSI_ALLOC extern struct sgsn_instance *sgsn; -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; static const struct tlv_definition gsm48_gmm_att_tlvdef = { .def = { @@ -2623,7 +2623,7 @@ static int do_act_pdp_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, bool *del goto no_context; /* schedule a dynamic look-up */ - mmctx->ggsn_lookup = talloc_zero(tall_bsc_ctx, struct sgsn_ggsn_lookup); + mmctx->ggsn_lookup = talloc_zero(tall_sgsn_ctx, struct sgsn_ggsn_lookup); if (!mmctx->ggsn_lookup) goto no_context; diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c index efbae2205..bac7325ba 100644 --- a/src/gprs/gprs_sgsn.c +++ b/src/gprs/gprs_sgsn.c @@ -56,7 +56,7 @@ #define GPRS_LLME_CHECK_TICK 30 extern struct sgsn_instance *sgsn; -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; LLIST_HEAD(sgsn_mm_ctxts); LLIST_HEAD(sgsn_ggsn_ctxts); @@ -135,7 +135,7 @@ static const struct rate_ctr_group_desc sgsn_ctrg_desc = { }; void sgsn_rate_ctr_init() { - sgsn->rate_ctrs = rate_ctr_group_alloc(tall_bsc_ctx, &sgsn_ctrg_desc, 0); + sgsn->rate_ctrs = rate_ctr_group_alloc(tall_sgsn_ctx, &sgsn_ctrg_desc, 0); OSMO_ASSERT(sgsn->rate_ctrs); } @@ -223,7 +223,7 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_gb(uint32_t tlli, { struct sgsn_mm_ctx *ctx; - ctx = talloc_zero(tall_bsc_ctx, struct sgsn_mm_ctx); + ctx = talloc_zero(tall_sgsn_ctx, struct sgsn_mm_ctx); if (!ctx) return NULL; @@ -257,7 +257,7 @@ struct sgsn_mm_ctx *sgsn_mm_ctx_alloc_iu(void *uectx) struct sgsn_mm_ctx *ctx; struct ranap_ue_conn_ctx *ue_ctx = uectx; - ctx = talloc_zero(tall_bsc_ctx, struct sgsn_mm_ctx); + ctx = talloc_zero(tall_sgsn_ctx, struct sgsn_mm_ctx); if (!ctx) return NULL; @@ -403,7 +403,7 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm, if (pdp) return NULL; - pdp = talloc_zero(tall_bsc_ctx, struct sgsn_pdp_ctx); + pdp = talloc_zero(tall_sgsn_ctx, struct sgsn_pdp_ctx); if (!pdp) return NULL; @@ -512,7 +512,7 @@ struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(uint32_t id) { struct sgsn_ggsn_ctx *ggc; - ggc = talloc_zero(tall_bsc_ctx, struct sgsn_ggsn_ctx); + ggc = talloc_zero(tall_sgsn_ctx, struct sgsn_ggsn_ctx); if (!ggc) return NULL; @@ -575,7 +575,7 @@ static struct apn_ctx *sgsn_apn_ctx_alloc(const char *ap_name, const char *imsi_ { struct apn_ctx *actx; - actx = talloc_zero(tall_bsc_ctx, struct apn_ctx); + actx = talloc_zero(tall_sgsn_ctx, struct apn_ctx); if (!actx) return NULL; actx->name = talloc_strdup(actx, ap_name); diff --git a/src/gprs/gprs_subscriber.c b/src/gprs/gprs_subscriber.c index dfd697b72..6c4f81fe8 100644 --- a/src/gprs/gprs_subscriber.c +++ b/src/gprs/gprs_subscriber.c @@ -47,7 +47,7 @@ (gsup)->imsi, \ ## args) -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; LLIST_HEAD(_gprs_subscribers); struct llist_head * const gprs_subscribers = &_gprs_subscribers; @@ -141,7 +141,7 @@ struct gprs_subscr *gprs_subscr_get_by_imsi(const char *imsi) static struct gprs_subscr *gprs_subscr_alloc(void) { struct gprs_subscr *gsub; - gsub = talloc_zero(tall_bsc_ctx, struct gprs_subscr); + gsub = talloc_zero(tall_sgsn_ctx, struct gprs_subscr); if (!gsub) return NULL; llist_add_tail(&gsub->entry, gprs_subscribers); diff --git a/src/gprs/gsup_client.c b/src/gprs/gsup_client.c index 95c498898..37bebd9d7 100644 --- a/src/gprs/gsup_client.c +++ b/src/gprs/gsup_client.c @@ -33,7 +33,7 @@ #include <errno.h> #include <string.h> -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; static void start_test_procedure(struct gsup_client *gsupc); @@ -274,7 +274,7 @@ struct gsup_client *gsup_client_create(const char *unit_name, struct gsup_client *gsupc; int rc; - gsupc = talloc_zero(tall_bsc_ctx, struct gsup_client); + gsupc = talloc_zero(tall_sgsn_ctx, struct gsup_client); OSMO_ASSERT(gsupc); /* struct ipaccess_unit has a non-const unit_name, so let's copy to be diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c index f824016cd..0369ed77b 100644 --- a/src/gprs/gtphub_main.c +++ b/src/gprs/gtphub_main.c @@ -51,7 +51,7 @@ #endif extern void *osmo_gtphub_ctx; -void *tall_bsc_ctx; +void *tall_sgsn_ctx; const char *gtphub_copyright = "Copyright (C) 2015 sysmocom s.f.m.c GmbH <info@sysmocom.de>\r\n" diff --git a/src/gprs/gtphub_vty.c b/src/gprs/gtphub_vty.c index ec35e4dc9..abc08fd69 100644 --- a/src/gprs/gtphub_vty.c +++ b/src/gprs/gtphub_vty.c @@ -37,7 +37,7 @@ * globals. */ #include <osmocom/sgsn/sgsn.h> extern struct sgsn_instance *sgsn; -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; static struct gtphub *g_hub = 0; static struct gtphub_cfg *g_cfg = 0; @@ -270,7 +270,7 @@ DEFUN(cfg_grx_ggsn, cfg_grx_ggsn_cmd, "grx-dns-add A.B.C.D", "Add DNS server\nIPv4 address\n") { - struct ares_addr_node *node = talloc_zero(tall_bsc_ctx, struct ares_addr_node); + struct ares_addr_node *node = talloc_zero(tall_sgsn_ctx, struct ares_addr_node); node->family = AF_INET; inet_aton(argv[0], &node->addr.addr4); diff --git a/src/gprs/sgsn_ares.c b/src/gprs/sgsn_ares.c index 17567c484..ba168d62e 100644 --- a/src/gprs/sgsn_ares.c +++ b/src/gprs/sgsn_ares.c @@ -24,7 +24,7 @@ #include <netdb.h> -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; struct cares_event_fd { struct llist_head head; @@ -110,7 +110,7 @@ static void setup_ares_osmo_fd(void *data, int fd, int read, int write) } LOGP(DGPRS, LOGL_DEBUG, "Registering C-ares fd (%d)\n", fd); - ufd = talloc_zero(tall_bsc_ctx, struct cares_event_fd); + ufd = talloc_zero(tall_sgsn_ctx, struct cares_event_fd); ufd->fd.fd = fd; ufd->fd.cb = ares_osmo_fd_cb; ufd->fd.data = data; @@ -137,7 +137,7 @@ int sgsn_ares_query(struct sgsn_instance *sgsn, const char *name, { struct cares_cb_data *cb_data; - cb_data = talloc_zero(tall_bsc_ctx, struct cares_cb_data); + cb_data = talloc_zero(tall_sgsn_ctx, struct cares_cb_data); cb_data->cb = cb; cb_data->data = data; ares_gethostbyname(sgsn->ares_channel, name, AF_INET, ares_cb, cb_data); diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index 11ed5d35d..a17d92556 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -76,7 +76,7 @@ #define _GNU_SOURCE #include <getopt.h> -void *tall_bsc_ctx; +void *tall_sgsn_ctx; struct ctrl_handle *g_ctrlh; struct gprs_ns_inst *sgsn_nsi; @@ -165,7 +165,7 @@ static void signal_handler(int signal) * and then return to the caller, who will abort the process */ case SIGUSR1: talloc_report(tall_vty_ctx, stderr); - talloc_report_full(tall_bsc_ctx, stderr); + talloc_report_full(tall_sgsn_ctx, stderr); break; case SIGUSR2: talloc_report_full(tall_vty_ctx, stderr); @@ -375,9 +375,9 @@ int main(int argc, char **argv) #endif srand(time(NULL)); - tall_bsc_ctx = talloc_named_const(NULL, 0, "osmo_sgsn"); - msgb_talloc_ctx_init(tall_bsc_ctx, 0); - vty_info.tall_ctx = tall_bsc_ctx; + tall_sgsn_ctx = talloc_named_const(NULL, 0, "osmo_sgsn"); + msgb_talloc_ctx_init(tall_sgsn_ctx, 0); + vty_info.tall_ctx = tall_sgsn_ctx; signal(SIGINT, &signal_handler); signal(SIGTERM, &signal_handler); @@ -386,8 +386,8 @@ int main(int argc, char **argv) signal(SIGUSR2, &signal_handler); osmo_init_ignore_signals(); - osmo_init_logging2(tall_bsc_ctx, &gprs_log_info); - osmo_stats_init(tall_bsc_ctx); + osmo_init_logging2(tall_sgsn_ctx, &gprs_log_info); + osmo_stats_init(tall_sgsn_ctx); vty_info.copyright = openbsc_copyright; vty_init(&vty_info); @@ -395,11 +395,11 @@ int main(int argc, char **argv) osmo_talloc_vty_add_cmds(); osmo_stats_vty_add_cmds(&gprs_log_info); sgsn_vty_init(&sgsn_inst.cfg); - ctrl_vty_init(tall_bsc_ctx); + ctrl_vty_init(tall_sgsn_ctx); #if BUILD_IU osmo_ss7_init(); - osmo_ss7_vty_init_asp(tall_bsc_ctx); + osmo_ss7_vty_init_asp(tall_sgsn_ctx); osmo_sccp_vty_init(); #endif @@ -420,12 +420,12 @@ int main(int argc, char **argv) sgsn_inst.config_file = CONFIG_FILE_DEFAULT; } - rate_ctr_init(tall_bsc_ctx); + rate_ctr_init(tall_sgsn_ctx); gprs_ns_set_log_ss(DNS); bssgp_set_log_ss(DBSSGP); - sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_bsc_ctx); + sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_sgsn_ctx); if (!sgsn_nsi) { LOGP(DGPRS, LOGL_ERROR, "Unable to instantiate NS\n"); exit(1); @@ -451,7 +451,7 @@ int main(int argc, char **argv) } /* start telnet after reading config for vty_get_bind_addr() */ - rc = telnet_init_dynif(tall_bsc_ctx, NULL, + rc = telnet_init_dynif(tall_sgsn_ctx, NULL, vty_get_bind_addr(), OSMO_VTY_PORT_SGSN); if (rc < 0) exit(1); @@ -507,7 +507,7 @@ int main(int argc, char **argv) #if BUILD_IU /* Note that these are mostly defaults and can be overriden from the VTY */ - sccp = osmo_sccp_simple_client(tall_bsc_ctx, "OsmoSGSN", + sccp = osmo_sccp_simple_client(tall_sgsn_ctx, "OsmoSGSN", (23 << 3) + 4, OSMO_SS7_ASP_PROT_M3UA, 0, NULL, @@ -517,7 +517,7 @@ int main(int argc, char **argv) return 8; } - ranap_iu_init(tall_bsc_ctx, DRANAP, "OsmoSGSN-IuPS", sccp, gsm0408_gprs_rcvmsg_iu, sgsn_ranap_iu_event); + ranap_iu_init(tall_sgsn_ctx, DRANAP, "OsmoSGSN-IuPS", sccp, gsm0408_gprs_rcvmsg_iu, sgsn_ranap_iu_event); #endif if (daemonize) { diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c index 87c68842f..72a310b24 100644 --- a/src/gprs/sgsn_vty.c +++ b/src/gprs/sgsn_vty.c @@ -56,7 +56,7 @@ #include <osmocom/ranap/iu_client.h> #endif -extern void *tall_bsc_ctx; +extern void *tall_sgsn_ctx; static struct sgsn_config *g_cfg = NULL; @@ -416,7 +416,7 @@ DEFUN(cfg_grx_ggsn, cfg_grx_ggsn_cmd, "Use the specified IP address for DNS-resolving the AP names to GGSN IP addresses\n" "IPv4 address\n") { - struct ares_addr_node *node = talloc_zero(tall_bsc_ctx, struct ares_addr_node); + struct ares_addr_node *node = talloc_zero(tall_sgsn_ctx, struct ares_addr_node); node->family = AF_INET; inet_aton(argv[0], &node->addr.addr4); |