diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-29 14:01:35 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2017-11-29 14:05:09 +0100 |
commit | 2e9ea50f7824e2028e44a27b72d5ae268cfc66f0 (patch) | |
tree | 041818ead287024197956b12f8220ac52e1ed3f0 /src/gprs/sgsn_main.c | |
parent | 291efcb590c136fc5ce0e0f54d6ecd2630e2f3e2 (diff) |
Add vty cmd 'cdr trap' to send CDR through CTRL iface
Default behavior is to have them disabled, and can be explicitly
disabled too by using 'no cdr trap' cmd.
Tested with osmo_ctrl.py that messages are send successfully:
TRAP 0 cdr-v1 20171129125950222,901700000015254,357737055592090,555,0,5,,pdp-periodic,2731,127.0.0.2,127.0.0.1,internet,176.16.222.3,20793,10045,1
Related: OS#2360
Change-Id: I1d144d87effd934d991257a65e19cf046a938907
Diffstat (limited to 'src/gprs/sgsn_main.c')
-rw-r--r-- | src/gprs/sgsn_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c index fe4192bbd..b2a028c43 100644 --- a/src/gprs/sgsn_main.c +++ b/src/gprs/sgsn_main.c @@ -76,6 +76,7 @@ #include <getopt.h> void *tall_bsc_ctx; +struct ctrl_handle *g_ctrlh; struct gprs_ns_inst *sgsn_nsi; static int daemonize = 0; @@ -367,7 +368,6 @@ static bool file_exists(const char *path) int main(int argc, char **argv) { - struct ctrl_handle *ctrl; int rc; #if BUILD_IU struct osmo_sccp_instance *sccp; @@ -454,9 +454,9 @@ int main(int argc, char **argv) /* start control interface after reading config for * ctrl_vty_get_bind_addr() */ - ctrl = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(), + g_ctrlh = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(), OSMO_CTRL_PORT_SGSN); - if (!ctrl) { + if (!g_ctrlh) { LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n"); exit(1); } |