aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gb_proxy_main.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-04 15:42:36 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-08-04 16:01:12 +0200
commiteece6277992a38559d6778badfb8840773f4108d (patch)
treeaf99c3669ef97c307f96c69c43d61f29bacdda50 /openbsc/src/gprs/gb_proxy_main.c
parentfa7a8bc6eb78bc8d2e5356e3db5c9f6d6dbd33bb (diff)
gbproxy: Remove global state from the gbproxy
Global state prevents us from writing simple units tests for single routines. Go through the code and add pointers to the gbproxy configuration. Only the vty and the test code remain using the global gbproxy instance.
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_main.c')
-rw-r--r--openbsc/src/gprs/gb_proxy_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c
index 773c98336..149253b53 100644
--- a/openbsc/src/gprs/gb_proxy_main.c
+++ b/openbsc/src/gprs/gb_proxy_main.c
@@ -80,7 +80,7 @@ static int proxy_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,
switch (event) {
case GPRS_NS_EVT_UNIT_DATA:
- rc = gbprox_rcvmsg(msg, nsvc->nsei, bvci, nsvc->nsvci);
+ rc = gbprox_rcvmsg(&gbcfg, msg, nsvc->nsei, bvci, nsvc->nsvci);
break;
default:
LOGP(DGPRS, LOGL_ERROR, "SGSN: Unknown event %u from NS\n", event);
@@ -264,7 +264,7 @@ int main(int argc, char **argv)
gprs_ns_vty_init(bssgp_nsi);
gprs_ns_set_log_ss(DNS);
bssgp_set_log_ss(DBSSGP);
- osmo_signal_register_handler(SS_L_NS, &gbprox_signal, NULL);
+ osmo_signal_register_handler(SS_L_NS, &gbprox_signal, &gbcfg);
rc = gbproxy_parse_config(config_file, &gbcfg);
if (rc < 0) {