diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-05-11 10:01:17 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-11 10:03:34 +0200 |
commit | 0a4050c63b8ff1b80714aee6d6a133de79366eb9 (patch) | |
tree | 91750623cbc24f136b30618938917691393c2e60 /openbsc/src/gprs/gb_proxy_main.c | |
parent | c1c1dd260a02d7679f0e1aff28f319defed950eb (diff) |
[gprs] gb_proxy: Send proper BSSGP STATUS msg in error case
In order to reuse the existing bssgp_tx_* functions without pulling
in the dependencies of gprs_bssgp.c, we have to move those functions
to gprs_bssgp_util.c
Furthermore, we can remove gbprox_nsi and replace it with bssgp_nsi,
and we can do proper processing of BVC-RESET messages coming from
the SGSN on the signalling BVC. In that case we need to send RESET
messages to all the BSS.
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_main.c')
-rw-r--r-- | openbsc/src/gprs/gb_proxy_main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/openbsc/src/gprs/gb_proxy_main.c b/openbsc/src/gprs/gb_proxy_main.c index 72f1417bc..1a5d7bd8d 100644 --- a/openbsc/src/gprs/gb_proxy_main.c +++ b/openbsc/src/gprs/gb_proxy_main.c @@ -39,6 +39,7 @@ #include <openbsc/signal.h> #include <openbsc/debug.h> #include <openbsc/gprs_ns.h> +#include <openbsc/gprs_bssgp.h> #include <openbsc/telnet_interface.h> #include <openbsc/vty.h> #include <openbsc/gb_proxy.h> @@ -53,8 +54,6 @@ void subscr_put() { abort(); } void *tall_bsc_ctx; -struct gprs_ns_inst *gbprox_nsi; - const char *openbsc_version = "Osmocom NSIP Proxy " PACKAGE_VERSION; const char *openbsc_copyright = "Copyright (C) 2010 Harald Welte and On-Waves\n" @@ -112,20 +111,20 @@ int main(int argc, char **argv) exit(2); } - gbprox_nsi = gprs_ns_instantiate(&proxy_ns_cb); - if (!gbprox_nsi) { + bssgp_nsi = gprs_ns_instantiate(&proxy_ns_cb); + if (!bssgp_nsi) { LOGP(DGPRS, LOGL_ERROR, "Unable to instantiate NS\n"); exit(1); } - gbcfg.nsi = gbprox_nsi; + gbcfg.nsi = bssgp_nsi; register_signal_handler(SS_NS, &gbprox_signal, NULL); - nsip_listen(gbprox_nsi, gbcfg.nsip_listen_port); + nsip_listen(bssgp_nsi, gbcfg.nsip_listen_port); /* 'establish' the outgoing connection to the SGSN */ sin.sin_family = AF_INET; sin.sin_port = htons(gbcfg.nsip_sgsn_port); sin.sin_addr.s_addr = htonl(gbcfg.nsip_sgsn_ip); - nsip_connect(gbprox_nsi, &sin, gbcfg.nsip_sgsn_nsei, + nsip_connect(bssgp_nsi, &sin, gbcfg.nsip_sgsn_nsei, gbcfg.nsip_sgsn_nsvci); while (1) { |