diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-09-09 17:00:21 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-09-09 17:04:30 +0200 |
commit | b305a004f7aa3e28f7ea52b36868826400fad483 (patch) | |
tree | ae6ce7782d256c23f99a2215605e64b630eb5e9a | |
parent | 6c8afe148b6e0ef8e4edd6ea4fbbdb3e6134f94b (diff) |
ctrl: subscriber-list-active: list only attached subscribers
I would have liked to add a regression test to verify this, but currently there
is no easy way to run CTRL tests and at the same time have access to the
osmo-msc in a way that simulates an attached subscriber.
Related: OS#2285
Change-Id: I003542b208ecf3713e9e67712d84ccb4c61af14e
-rw-r--r-- | src/libmsc/ctrl_commands.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libmsc/ctrl_commands.c b/src/libmsc/ctrl_commands.c index 7e445aa19..4767ddddf 100644 --- a/src/libmsc/ctrl_commands.c +++ b/src/libmsc/ctrl_commands.c @@ -68,6 +68,9 @@ static int get_subscriber_list(struct ctrl_cmd *cmd, void *d) cmd->reply = talloc_strdup(cmd, ""); llist_for_each_entry(vsub, &msc_ctrl_net->vlr->subscribers, list) { + /* Do not list subscribers that aren't successfully attached. */ + if (!vsub->lu_complete) + continue; cmd->reply = talloc_asprintf_append(cmd->reply, "%s,%s\n", vsub->imsi, vsub->msisdn); } |