diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-08-16 11:49:11 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-09-11 16:20:45 +0200 |
commit | fa0ec157af24af30591bad295d196b31bfc943a2 (patch) | |
tree | e1d356ecc995f86a247b9f31768af67c457963a9 /openbsc/src/osmo-bsc/osmo_bsc_ctrl.c | |
parent | a5352a017412bde12461bbb48f731c4683673af3 (diff) |
ctrl: Do not allow to set the RF Lock for a single trx
The ip.access nanoBTS has issues if the admin changes are called
too often in too little time. This will lead to a situation where
the site manager will fail to start properly. Remove the TRX code
as the RF Control class does not support setting this per TRX.
Diffstat (limited to 'openbsc/src/osmo-bsc/osmo_bsc_ctrl.c')
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_ctrl.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index d6a569177..9782126a7 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -219,43 +219,6 @@ err: return 1; } -CTRL_CMD_DEFINE(trx_rf_lock, "rf_locked"); -static int get_trx_rf_lock(struct ctrl_cmd *cmd, void *data) -{ - struct gsm_bts_trx *trx = cmd->node; - if (!trx) { - cmd->reply = "trx not found."; - return CTRL_CMD_ERROR; - } - - cmd->reply = talloc_asprintf(cmd, "%u", trx->mo.nm_state.administrative == NM_STATE_LOCKED ? 1 : 0); - return CTRL_CMD_REPLY; -} - -static int set_trx_rf_lock(struct ctrl_cmd *cmd, void *data) -{ - int locked = atoi(cmd->value); - struct gsm_bts_trx *trx = cmd->node; - if (!trx) { - cmd->reply = "trx not found."; - return CTRL_CMD_ERROR; - } - - gsm_trx_lock_rf(trx, locked); - - return get_trx_rf_lock(cmd, data); -} - -static int verify_trx_rf_lock(struct ctrl_cmd *cmd, const char *value, void *data) -{ - int locked = atoi(cmd->value); - - if ((locked != 0) && (locked != 1)) - return 1; - - return 0; -} - CTRL_CMD_DEFINE(net_rf_lock, "rf_locked"); static int get_net_rf_lock(struct ctrl_cmd *cmd, void *data) { @@ -307,9 +270,6 @@ int bsc_ctrl_cmds_install() if (rc) goto end; rc = ctrl_cmd_install(CTRL_NODE_NET, &cmd_net_rf_lock); - if (rc) - goto end; - rc = ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_lock); end: return rc; } |