vty: fix segfault if rf_ctl is not set
This is the case of osmo-nitb, since it does not call osmo_bsc_rf_create(). term1: $ ./osmo-nitb -c ../openbsc.cfg.nanobts term2: $ telnet localhost 4242 term2: OpenBSC> show network term1: Segmentation fault
This commit is contained in:
parent
16b7f5c4ef
commit
682587748f
|
@ -189,7 +189,7 @@ static void net_dump_vty(struct vty *vty, struct gsm_network *net)
|
|||
dump_pchan_load_vty(vty, " ", &pl);
|
||||
|
||||
/* show rf */
|
||||
if (net->msc_data)
|
||||
if (net->msc_data && net->msc_data->rf_ctl)
|
||||
vty_out(vty, " Last RF Command: %s%s",
|
||||
net->msc_data->rf_ctl->last_state_command,
|
||||
VTY_NEWLINE);
|
||||
|
|
Loading…
Reference in New Issue