bsc: Call the RF Control interface ctrl all the way
We had the rf_ctrl_name and the rf_ctl pointer, make both use the word ctrl.
This commit is contained in:
parent
fe1ca353bb
commit
5e3bbba962
|
@ -65,7 +65,7 @@ struct osmo_msc_data {
|
||||||
char *mid_call_txt;
|
char *mid_call_txt;
|
||||||
int mid_call_timeout;
|
int mid_call_timeout;
|
||||||
char *rf_ctrl_name;
|
char *rf_ctrl_name;
|
||||||
struct osmo_bsc_rf *rf_ctl;
|
struct osmo_bsc_rf *rf_ctrl;
|
||||||
|
|
||||||
/* ussd welcome text */
|
/* ussd welcome text */
|
||||||
char *ussd_welcome_txt;
|
char *ussd_welcome_txt;
|
||||||
|
|
|
@ -189,9 +189,9 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
|
||||||
dump_pchan_load_vty(vty, " ", &pl);
|
dump_pchan_load_vty(vty, " ", &pl);
|
||||||
|
|
||||||
/* show rf */
|
/* show rf */
|
||||||
if (net->msc_data && net->msc_data->rf_ctl)
|
if (net->msc_data && net->msc_data->rf_ctrl)
|
||||||
vty_out(vty, " Last RF Command: %s%s",
|
vty_out(vty, " Last RF Command: %s%s",
|
||||||
net->msc_data->rf_ctl->last_state_command,
|
net->msc_data->rf_ctrl->last_state_command,
|
||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
|
|
||||||
int bsc_grace_allow_new_connection(struct gsm_network *network)
|
int bsc_grace_allow_new_connection(struct gsm_network *network)
|
||||||
{
|
{
|
||||||
if (!network->msc_data->rf_ctl)
|
if (!network->msc_data->rf_ctrl)
|
||||||
return 1;
|
return 1;
|
||||||
return network->msc_data->rf_ctl->policy == S_RF_ON;
|
return network->msc_data->rf_ctrl->policy == S_RF_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_sub(struct gsm_lchan *lchan, const char *text)
|
static int handle_sub(struct gsm_lchan *lchan, const char *text)
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
struct gsm_network *bsc_gsmnet = 0;
|
struct gsm_network *bsc_gsmnet = 0;
|
||||||
static const char *config_file = "openbsc.cfg";
|
static const char *config_file = "openbsc.cfg";
|
||||||
static const char *rf_ctl = NULL;
|
static const char *rf_ctrl = NULL;
|
||||||
extern const char *openbsc_copyright;
|
extern const char *openbsc_copyright;
|
||||||
static int daemonize = 0;
|
static int daemonize = 0;
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ static void handle_options(int argc, char **argv)
|
||||||
log_set_log_level(osmo_stderr_target, atoi(optarg));
|
log_set_log_level(osmo_stderr_target, atoi(optarg));
|
||||||
break;
|
break;
|
||||||
case 'r':
|
case 'r':
|
||||||
rf_ctl = optarg;
|
rf_ctrl = optarg;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* ignore */
|
/* ignore */
|
||||||
|
@ -370,13 +370,13 @@ int main(int argc, char **argv)
|
||||||
ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_lock);
|
ctrl_cmd_install(CTRL_NODE_TRX, &cmd_trx_rf_lock);
|
||||||
|
|
||||||
data = bsc_gsmnet->msc_data;
|
data = bsc_gsmnet->msc_data;
|
||||||
if (rf_ctl)
|
if (rf_ctrl)
|
||||||
bsc_replace_string(data, &data->rf_ctrl_name, rf_ctl);
|
bsc_replace_string(data, &data->rf_ctrl_name, rf_ctrl);
|
||||||
|
|
||||||
if (data->rf_ctrl_name) {
|
if (data->rf_ctrl_name) {
|
||||||
data->rf_ctl = osmo_bsc_rf_create(data->rf_ctrl_name,
|
data->rf_ctrl = osmo_bsc_rf_create(data->rf_ctrl_name,
|
||||||
bsc_gsmnet);
|
bsc_gsmnet);
|
||||||
if (!data->rf_ctl) {
|
if (!data->rf_ctrl) {
|
||||||
fprintf(stderr, "Failed to create the RF service.\n");
|
fprintf(stderr, "Failed to create the RF service.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,7 @@ static int rf_write_cmd(struct osmo_fd *fd, struct msgb *msg)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rf_ctl_accept(struct osmo_fd *bfd, unsigned int what)
|
static int rf_ctrl_accept(struct osmo_fd *bfd, unsigned int what)
|
||||||
{
|
{
|
||||||
struct osmo_bsc_rf_conn *conn;
|
struct osmo_bsc_rf_conn *conn;
|
||||||
struct osmo_bsc_rf *rf = bfd->data;
|
struct osmo_bsc_rf *rf = bfd->data;
|
||||||
|
@ -338,7 +338,7 @@ struct osmo_bsc_rf *osmo_bsc_rf_create(const char *path, struct gsm_network *net
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd->when = BSC_FD_READ;
|
bfd->when = BSC_FD_READ;
|
||||||
bfd->cb = rf_ctl_accept;
|
bfd->cb = rf_ctrl_accept;
|
||||||
bfd->data = rf;
|
bfd->data = rf;
|
||||||
|
|
||||||
if (osmo_fd_register(bfd) != 0) {
|
if (osmo_fd_register(bfd) != 0) {
|
||||||
|
|
Loading…
Reference in New Issue