diff --git a/openbsc/include/openbsc/osmo_msc_data.h b/openbsc/include/openbsc/osmo_msc_data.h index b8db686f1..498b1005b 100644 --- a/openbsc/include/openbsc/osmo_msc_data.h +++ b/openbsc/include/openbsc/osmo_msc_data.h @@ -26,6 +26,8 @@ #include "bsc_msc.h" +struct osmo_bsc_rf; + struct osmo_msc_data { /* Connection data */ char *bsc_token; @@ -38,6 +40,7 @@ struct osmo_msc_data { /* rf ctl related bits */ char *ussd_grace_txt; + struct osmo_bsc_rf *rf_ctl; }; #endif diff --git a/openbsc/src/bsc/osmo_bsc_main.c b/openbsc/src/bsc/osmo_bsc_main.c index a79d7ea9d..649f0a532 100644 --- a/openbsc/src/bsc/osmo_bsc_main.c +++ b/openbsc/src/bsc/osmo_bsc_main.c @@ -216,9 +216,9 @@ int main(int argc, char **argv) } if (rf_ctl) { - struct osmo_bsc_rf *rf; - rf = osmo_bsc_rf_create(rf_ctl, bsc_gsmnet); - if (!rf) { + struct osmo_msc_data *data = bsc_gsmnet->msc_data; + data->rf_ctl = osmo_bsc_rf_create(rf_ctl, bsc_gsmnet); + if (!data->rf_ctl) { fprintf(stderr, "Failed to create the RF service.\n"); exit(1); }