aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/osmo_bsc_ctrl.c
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-01-03 14:05:24 +0100
committerHarald Welte <laforge@gnumonks.org>2018-01-05 10:10:56 +0000
commit607f8c41bc4606a589a0c2e751812dfd12d94cae (patch)
treec2b10546b5a5a16184ffd3f56a1dea068e822aa1 /src/osmo-bsc/osmo_bsc_ctrl.c
parented23c1d83da08ded94ce7ce0d23ace79cb31dd61 (diff)
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
Diffstat (limited to 'src/osmo-bsc/osmo_bsc_ctrl.c')
-rw-r--r--src/osmo-bsc/osmo_bsc_ctrl.c5
1 files changed, 4 insertions, 1 deletions
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";