summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-02-08 12:12:03 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-02-08 12:47:39 +0100
commita9fae1ae66df57f76a0aedbd0b56228959d37d56 (patch)
tree7390351b08bc132fd425195171edb2d45761ee41
parent362d10f20adfa0a956c43965f409cc62bb776342 (diff)
bsc: rf_ctrl will always be created, remove the NULL checks
-rw-r--r--openbsc/src/libbsc/bsc_rf_ctrl.c4
-rw-r--r--openbsc/src/libbsc/bsc_vty.c4
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_grace.c4
3 files changed, 4 insertions, 8 deletions
diff --git a/openbsc/src/libbsc/bsc_rf_ctrl.c b/openbsc/src/libbsc/bsc_rf_ctrl.c
index 59f31c99a..0538482a1 100644
--- a/openbsc/src/libbsc/bsc_rf_ctrl.c
+++ b/openbsc/src/libbsc/bsc_rf_ctrl.c
@@ -108,7 +108,7 @@ enum osmo_bsc_rf_policy osmo_bsc_rf_get_policy_by_bts(struct gsm_bts *bts)
{
struct osmo_bsc_data *bsc_data = bts->network->bsc_data;
- if (!bsc_data || !bsc_data->rf_ctrl)
+ if (!bsc_data)
return OSMO_BSC_RF_POLICY_UNKNOWN;
switch (bsc_data->rf_ctrl->policy) {
@@ -412,7 +412,7 @@ static int msc_signal_handler(unsigned int subsys, unsigned int signal,
msc = signal_data;
/* check if we have the needed information */
- if (!net->bsc_data || !net->bsc_data->rf_ctrl)
+ if (!net->bsc_data)
return 0;
if (msc->data->type != MSC_CON_TYPE_NORMAL)
return 0;
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 00307649a..2a4d0b3fb 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -210,11 +210,11 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
dump_pchan_load_vty(vty, " ", &pl);
/* show rf */
- if (net->bsc_data && net->bsc_data->rf_ctrl)
+ if (net->bsc_data)
vty_out(vty, " Last RF Command: %s%s",
net->bsc_data->rf_ctrl->last_state_command,
VTY_NEWLINE);
- if (net->bsc_data && net->bsc_data->rf_ctrl)
+ if (net->bsc_data)
vty_out(vty, " Last RF Lock Command: %s%s",
net->bsc_data->rf_ctrl->last_rf_lock_ctrl_command,
VTY_NEWLINE);
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_grace.c b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
index 341971ef2..4e1c79ebd 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_grace.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_grace.c
@@ -28,8 +28,6 @@
int bsc_grace_allow_new_connection(struct gsm_network *network, struct gsm_bts *bts)
{
- if (!network->bsc_data->rf_ctrl)
- return 1;
if (bts->excl_from_rf_lock)
return 1;
return network->bsc_data->rf_ctrl->policy == S_RF_ON;
@@ -43,8 +41,6 @@ int bsc_grace_paging_request(struct gsm_subscriber *subscr, int chan_needed,
{
struct gsm_bts *bts = NULL;
- if (!subscr->net->bsc_data->rf_ctrl)
- goto page;
if (subscr->net->bsc_data->rf_ctrl->policy == S_RF_ON)
goto page;