diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-08-16 14:29:53 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2013-01-15 11:27:28 +0100 |
commit | 7b6ea56f4185a7c11b7ba50ee373854ca2074368 (patch) | |
tree | ec3e1e00c742119a22e660c965d9af717e51f8e1 /openbsc/src/osmo-bsc | |
parent | baa1a2df2086b1c920053c1aaa6062929f2256e4 (diff) |
bsc: Use the BSC RF CTRL to change the RF state of the TRXs
Use the delayed scheduling feature of the osmo_bsc_rf class to
avoid crashing the site controller of the nanoBTS.
Diffstat (limited to 'openbsc/src/osmo-bsc')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_ctrl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index 8f0db7e88..6802b4252 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -388,19 +388,19 @@ static int set_net_rf_lock(struct ctrl_cmd *cmd, void *data) { int locked = atoi(cmd->value); struct gsm_network *net = cmd->node; - struct gsm_bts *bts; if (!net) { cmd->reply = "net not found."; return CTRL_CMD_ERROR; } - llist_for_each_entry(bts, &net->bts_list, list) { - struct gsm_bts_trx *trx; - llist_for_each_entry(trx, &bts->trx_list, list) { - gsm_trx_lock_rf(trx, locked); - } + if (!net->bsc_data->rf_ctrl) { + cmd->reply = "RF Ctrl not enabled"; + return CTRL_CMD_ERROR; } + osmo_bsc_rf_schedule_lock(net->bsc_data->rf_ctrl, + locked == 1 ? '0' : '1'); + cmd->reply = talloc_asprintf(cmd, "%u", locked); if (!cmd->reply) { cmd->reply = "OOM."; |