diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-08-16 11:49:11 +0200 |
---|---|---|
committer | Daniel Willmann <daniel@totalueberwachung.de> | 2011-08-22 19:27:49 +0200 |
commit | 5fff97fa1cf2983dd8a7d67bffaf948e9216826b (patch) | |
tree | ecedda3a138a50016386fb532569290b9f167226 | |
parent | e3e4f9c4b40b6d4d10d9c33e9d053a6570995f10 (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.
-rw-r--r-- | openbsc/src/osmo-bsc/osmo_bsc_ctrl.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c index a6148da53..b82a62abd 100644 --- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c +++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c @@ -212,43 +212,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) { @@ -302,7 +265,6 @@ int bsc_ctrl_cmds_install() 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; } |