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
This commit is contained in:
Neels Hofmeyr 2017-09-09 17:00:21 +02:00
parent 6c8afe148b
commit b305a004f7
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}