aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-12-11 14:35:43 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-12-12 17:39:17 +0100
commit2599644d8161e6a091596e313ece56189d12348f (patch)
tree719a714a9ec019775e705925fce2d814386194e8
parent2e485767da7210c18621ba74962b94b7c1fd91cd (diff)
remove pointless declaration of struct gsm_network
We were passing a NULL pointer of type struct gsm_network * to ctrl_interface_setup_dynip(). Remove the pointless declaration of this struct. Also, replace the sgsn_controlif_setup() helper function with a direct call to ctrl_interface_setup_dynip(). The helper fnuction was just a thin wrapper around the latter. Change-Id: Ib4151afa5bff01e63b462cca517fb60ac0503759 Related: OS#3356
-rw-r--r--include/osmocom/sgsn/gprs_sgsn.h3
-rw-r--r--src/gprs/sgsn_ctrl.c6
-rw-r--r--src/gprs/sgsn_main.c4
3 files changed, 2 insertions, 11 deletions
diff --git a/include/osmocom/sgsn/gprs_sgsn.h b/include/osmocom/sgsn/gprs_sgsn.h
index b6afe69..a0a056f 100644
--- a/include/osmocom/sgsn/gprs_sgsn.h
+++ b/include/osmocom/sgsn/gprs_sgsn.h
@@ -404,9 +404,6 @@ char *gprs_pdpaddr2str(uint8_t *pdpa, uint8_t len);
/*
* ctrl interface related work
*/
-struct gsm_network;
-struct ctrl_handle *sgsn_controlif_setup(struct gsm_network *,
- const char *bind_addr, uint16_t port);
int sgsn_ctrl_cmds_install(void);
/*
diff --git a/src/gprs/sgsn_ctrl.c b/src/gprs/sgsn_ctrl.c
index dc5ae79..ad91d25 100644
--- a/src/gprs/sgsn_ctrl.c
+++ b/src/gprs/sgsn_ctrl.c
@@ -60,9 +60,3 @@ int sgsn_ctrl_cmds_install(void)
rc |= ctrl_cmd_install(CTRL_NODE_ROOT, &cmd_subscriber_list);
return rc;
}
-
-struct ctrl_handle *sgsn_controlif_setup(struct gsm_network *net,
- const char *bind_addr, uint16_t port)
-{
- return ctrl_interface_setup_dynip(net, bind_addr, port, NULL);
-}
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index 798e507..f12270d 100644
--- a/src/gprs/sgsn_main.c
+++ b/src/gprs/sgsn_main.c
@@ -450,8 +450,8 @@ int main(int argc, char **argv)
/* start control interface after reading config for
* ctrl_vty_get_bind_addr() */
- g_ctrlh = sgsn_controlif_setup(NULL, ctrl_vty_get_bind_addr(),
- OSMO_CTRL_PORT_SGSN);
+ g_ctrlh = ctrl_interface_setup_dynip(NULL, ctrl_vty_get_bind_addr(),
+ OSMO_CTRL_PORT_SGSN, NULL);
if (!g_ctrlh) {
LOGP(DGPRS, LOGL_ERROR, "Failed to create CTRL interface.\n");
exit(1);