Stefan Sperling has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12242 )

Change subject: remove pointless declaration of struct gsm_network
......................................................................

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
---
M include/osmocom/sgsn/gprs_sgsn.h
M src/gprs/sgsn_ctrl.c
M src/gprs/sgsn_main.c
3 files changed, 2 insertions(+), 11 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Max: Looks good to me, but someone else must approve
  Pau Espin Pedrol: Looks good to me, approved



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 @@
 /*
  * 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 @@
        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 @@

        /* 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);

--
To view, visit https://gerrit.osmocom.org/12242
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4151afa5bff01e63b462cca517fb60ac0503759
Gerrit-Change-Number: 12242
Gerrit-PatchSet: 2
Gerrit-Owner: Stefan Sperling <s...@stsp.name>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msur...@sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pes...@sysmocom.de>
Gerrit-Reviewer: Stefan Sperling <s...@stsp.name>

Reply via email to