Stop UE with ^C
This commit is contained in:
@@ -426,7 +426,7 @@ int main( int argc, char **argv ) {
|
|||||||
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == NULL) {
|
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == NULL) {
|
||||||
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
|
||||||
}
|
}
|
||||||
set_softmodem_sighandler();
|
//set_softmodem_sighandler();
|
||||||
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
|
CONFIG_SETRTFLAG(CONFIG_NOEXITONHELP);
|
||||||
memset(openair0_cfg,0,sizeof(openair0_config_t)*MAX_CARDS);
|
memset(openair0_cfg,0,sizeof(openair0_config_t)*MAX_CARDS);
|
||||||
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
|
memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
|
||||||
@@ -550,15 +550,28 @@ int main( int argc, char **argv ) {
|
|||||||
|
|
||||||
// Sleep a while before checking all parameters have been used
|
// Sleep a while before checking all parameters have been used
|
||||||
// Some are used directly in external threads, asynchronously
|
// Some are used directly in external threads, asynchronously
|
||||||
sleep(20);
|
sleep(2);
|
||||||
config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS);
|
config_check_unknown_cmdlineopt(CONFIG_CHECKALLSECTIONS);
|
||||||
|
|
||||||
while(true)
|
// wait for end of program
|
||||||
sleep(3600);
|
printf("Entering ITTI signals handler\n");
|
||||||
|
printf("TYPE <CTRL-C> TO TERMINATE\n");
|
||||||
|
itti_wait_tasks_end();
|
||||||
|
printf("Returned from ITTI signal handler\n");
|
||||||
|
oai_exit=1;
|
||||||
|
printf("oai_exit=%d\n",oai_exit);
|
||||||
|
|
||||||
if (ouput_vcd)
|
if (ouput_vcd)
|
||||||
vcd_signal_dumper_close();
|
vcd_signal_dumper_close();
|
||||||
|
|
||||||
|
if (PHY_vars_UE_g && PHY_vars_UE_g[0]) {
|
||||||
|
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||||
|
PHY_VARS_NR_UE *phy_vars = PHY_vars_UE_g[0][CC_id];
|
||||||
|
if (phy_vars && phy_vars->rfdevice.trx_end_func)
|
||||||
|
phy_vars->rfdevice.trx_end_func(&phy_vars->rfdevice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user