diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-02-23 15:10:33 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-02-25 12:18:04 +0100 |
commit | 73828152d9472d5977a18491f2d9ca9b24077f43 (patch) | |
tree | 72d54bdd16bd2efa3f750825bff79771b7310fe7 /openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c | |
parent | fc7add20e1b54e1b0d10c7457629507fb62d7d31 (diff) |
enable ctrl bind config for various programs
Add ctrl_vty_init() calls and feed the ctrl_vty_get_bind_addr() return value to
ctrl_interface_setup() in the following programs:
osmo-bsc
osmo-bsc_nat
osmo-nitb
osmo-sgsn
For osmo-sgsn, move the control interface setup invocation below the config
parsing, so that the ctrl_vty_get_bind_addr() can return the configured
address.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c index f3ca92400..ec4243e8e 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c +++ b/openbsc/src/osmo-bsc_nat/bsc_nat_ctrl.c @@ -470,13 +470,14 @@ static int get_net_save_cmd(struct ctrl_cmd *cmd, void *data) return CTRL_CMD_ERROR; } -struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, int port) +struct ctrl_handle *bsc_nat_controlif_setup(struct bsc_nat *nat, + const char *bind_addr, int port) { struct ctrl_handle *ctrl; int rc; - ctrl = bsc_controlif_setup(NULL, OSMO_CTRL_PORT_BSC_NAT); + ctrl = bsc_controlif_setup(NULL, bind_addr, OSMO_CTRL_PORT_BSC_NAT); if (!ctrl) { fprintf(stderr, "Failed to initialize the control interface. Exiting.\n"); return NULL; |