Review at  https://gerrit.osmocom.org/4369

ifdef: fix conditional compiling

The function calls osmo_ss7_vty_go_parent() and gtphub_vty_is_config_node()
are not guarded by an ifdef. The functions are only needed for IU
support where libosmo-sigtran is used.

Guard the function cally with a BUILD_IU

Change-Id: I1c609ef0c344ce825c313335c7e084bf97159262
---
M src/gprs/gtphub_main.c
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/69/4369/1

diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index 782afb3..c26a864 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -117,11 +117,9 @@
 
 int gtphub_vty_go_parent(struct vty *vty)
 {
-       switch (vty->node) {
-       default:
-               osmo_ss7_vty_go_parent(vty);
-       }
-
+#if BUILD_IU
+       osmo_ss7_vty_go_parent(vty);
+#endif
        return vty->node;
 }
 
@@ -129,8 +127,10 @@
 {
        /* Check if libosmo-sccp declares the node in
         * question as config node */
+#if BUILD_IU
        if (osmo_ss7_is_config_node(vty, node))
                return 1;
+#endif
 
        switch (node) {
        /* add items that are not config */

-- 
To view, visit https://gerrit.osmocom.org/4369
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c609ef0c344ce825c313335c7e084bf97159262
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: dexter <[email protected]>

Reply via email to