neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/19837 )


Change subject: CBSP VTY: add 'cbc' / 'restart' command
......................................................................

CBSP VTY: add 'cbc' / 'restart' command

To change between CBC server and client modes, the ttcn3-bsc-tests suite must
be able to restart the CBSP link in a running osmo-bsc.

I first considered doing that by the 'remote-ip' (client) and 'listen-port'
(server) commands, but since those also have a remote-port and listen-ip
setting to go with those, it is better to explicitly restart.

Related: I7eea0dd39de50ed80af79e0f10c836b8685d8644 (osmo-ttcn3-hacks)
Change-Id: I5724369527cf38bd7b82f3db5e2b44254d22f8d5
---
M src/osmo-bsc/cbsp_link.c
1 file changed, 12 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/37/19837/1

diff --git a/src/osmo-bsc/cbsp_link.c b/src/osmo-bsc/cbsp_link.c
index d6e688e..034f7b4 100644
--- a/src/osmo-bsc/cbsp_link.c
+++ b/src/osmo-bsc/cbsp_link.c
@@ -377,6 +377,17 @@
        return CMD_SUCCESS;
 }

+DEFUN(cfg_cbc_restart, cfg_cbc_restart_cmd,
+       "restart",
+       "Restart the CBSP link, so that configuration on the 'cbc' node takes 
effect.\n")
+{
+       if (bsc_cbc_link_restart()) {
+               vty_out(vty, "%% Error restarting CBSP link%s", VTY_NEWLINE);
+               return CMD_WARNING;
+       }
+       return CMD_SUCCESS;
+}
+
 static struct cmd_node cbc_node = {
        CBC_NODE,
        "%s(config-cbc)# ",
@@ -440,4 +451,5 @@
        install_element(CBC_NODE, &cfg_cbc_listen_port_cmd);
        install_element(CBC_NODE, &cfg_cbc_no_listen_port_cmd);
        install_element(CBC_NODE, &cfg_cbc_listen_ip_cmd);
+       install_element(CBC_NODE, &cfg_cbc_restart_cmd);
 }

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/19837
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I5724369527cf38bd7b82f3db5e2b44254d22f8d5
Gerrit-Change-Number: 19837
Gerrit-PatchSet: 1
Gerrit-Owner: neels <[email protected]>
Gerrit-MessageType: newchange

Reply via email to