From 6263cf350a8e4db5e6048828790f2afc567c6372 Mon Sep 17 00:00:00 2001 From: Max Date: Sat, 17 Dec 2022 20:59:00 +0300 Subject: [PATCH] ctrl: take both address and port from vty config Change-Id: Iecae15333a4e77b38d9bce8c8e591af3d5fcf347 --- include/osmocom/hlr/hlr.h | 1 - src/ctrl.c | 7 ++----- src/hlr.c | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/osmocom/hlr/hlr.h b/include/osmocom/hlr/hlr.h index e8df5cd1..3acb3c51 100644 --- a/include/osmocom/hlr/hlr.h +++ b/include/osmocom/hlr/hlr.h @@ -48,7 +48,6 @@ struct hlr { /* Control Interface */ struct ctrl_handle *ctrl; - const char *ctrl_bind_addr; /* Local bind addr */ char *gsup_bind_addr; diff --git a/src/ctrl.c b/src/ctrl.c index 11b0f5c9..4e4afeba 100644 --- a/src/ctrl.c +++ b/src/ctrl.c @@ -771,11 +771,8 @@ static int hlr_ctrl_cmds_install(void) struct ctrl_handle *hlr_controlif_setup(struct hlr *hlr) { int rc; - struct ctrl_handle *hdl = ctrl_interface_setup_dynip2(hlr, - hlr->ctrl_bind_addr, - OSMO_CTRL_PORT_HLR, - hlr_ctrl_node_lookup, - _LAST_CTRL_NODE_HLR); + struct ctrl_handle *hdl = ctrl_interface_setup2(hlr, OSMO_CTRL_PORT_HLR, hlr_ctrl_node_lookup, + _LAST_CTRL_NODE_HLR); if (!hdl) return NULL; diff --git a/src/hlr.c b/src/hlr.c index 193dd38d..037ebfe3 100644 --- a/src/hlr.c +++ b/src/hlr.c @@ -830,7 +830,6 @@ int main(int argc, char **argv) } proxy_init(g_hlr->gs); - g_hlr->ctrl_bind_addr = ctrl_vty_get_bind_addr(); g_hlr->ctrl = hlr_controlif_setup(g_hlr); dgsm_start(hlr_ctx);