From 607f8c41bc4606a589a0c2e751812dfd12d94cae Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Wed, 3 Jan 2018 14:05:24 +0100 Subject: Fix "CTRL GET msc_connection_status" response. Since 39f62bbcbf4309492a6d5bc07213cd74f650d41e the msc_connection_status variable in osmo_bsc_ctrl.c is no longer updated. Query the connection's status from the is_connected flag in struct bsc_msc_connection instead. Makes test BSC_Tests.TC_ctrl_msc_connection_status in ttcn3-bsc-test pass. However, we only query the connection status of the first MSC. Adapting the control command to work with mulitple MSCs is left for future work. Change-Id: I8ab8aac83ef6b7831b6136f7e9e3eddfbb43ecaa Related: OS#2729 --- src/osmo-bsc/osmo_bsc_ctrl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/osmo-bsc') diff --git a/src/osmo-bsc/osmo_bsc_ctrl.c b/src/osmo-bsc/osmo_bsc_ctrl.c index 8c9dfe7a9..4460288e6 100644 --- a/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/src/osmo-bsc/osmo_bsc_ctrl.c @@ -62,7 +62,10 @@ static int msc_connection_status = 0; static int get_msc_connection_status(struct ctrl_cmd *cmd, void *data) { - if (msc_connection_status) + struct gsm_network *gsmnet = data; + struct bsc_msc_data *msc = osmo_msc_data_find(gsmnet, 0); + + if (msc->msc_con->is_connected) cmd->reply = "connected"; else cmd->reply = "disconnected"; -- cgit v1.2.3