diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-05-30 14:40:54 -0400 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-06-02 08:43:29 +0200 |
commit | c36a13b073d39a5249418e7e0e78b7a45bfeb310 (patch) | |
tree | fd48291c2d4e1452e7ccd7ff438523d461a03dde /openbsc/src/libbsc/bsc_ctrl_commands.c | |
parent | 9cb249bf84b256168b807305a1c4884c5c5fc9fb (diff) |
libbsc: Move SIs update/generation for a BTS into a separate function.
The code to do that doesn't belong to the control interface, so
abstract it out to a separate function gsm_bts_set_system_infos().
[hfreyther: Fix the coding style...]
Diffstat (limited to 'openbsc/src/libbsc/bsc_ctrl_commands.c')
-rw-r--r-- | openbsc/src/libbsc/bsc_ctrl_commands.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/openbsc/src/libbsc/bsc_ctrl_commands.c b/openbsc/src/libbsc/bsc_ctrl_commands.c index 1d91c5fc2..b6b1c9a8b 100644 --- a/openbsc/src/libbsc/bsc_ctrl_commands.c +++ b/openbsc/src/libbsc/bsc_ctrl_commands.c @@ -202,20 +202,12 @@ static int get_bts_si(struct ctrl_cmd *cmd, void *data) static int set_bts_si(struct ctrl_cmd *cmd, void *data) { struct gsm_bts *bts = cmd->node; - struct gsm_bts_trx *trx; + int rc; - /* Generate a new ID */ - bts->bcch_change_mark += 1; - bts->bcch_change_mark %= 0x7; - - llist_for_each_entry(trx, &bts->trx_list, list) { - int rc; - - rc = gsm_bts_trx_set_system_infos(trx); - if (rc != 0) { - cmd->reply = "Failed to generate SI"; - return CTRL_CMD_ERROR; - } + rc = gsm_bts_set_system_infos(bts); + if (rc != 0) { + cmd->reply = "Failed to generate SI"; + return CTRL_CMD_ERROR; } cmd->reply = "Generated new System Information"; |