fix some exit situations, that was badly done by SIGUSR1 handler
This commit is contained in:
@@ -141,7 +141,6 @@ static struct {
|
||||
|
||||
extern double cpuf;
|
||||
|
||||
void exit_fun(const char* s);
|
||||
|
||||
void init_eNB(int,int);
|
||||
void stop_eNB(int nb_inst);
|
||||
|
||||
@@ -319,13 +319,13 @@ void signal_handler(int sig) {
|
||||
|
||||
|
||||
|
||||
void exit_fun(const char* s)
|
||||
void exit_function(const char* file, const char* function, const int line, const char* s)
|
||||
{
|
||||
|
||||
int ru_id;
|
||||
|
||||
if (s != NULL) {
|
||||
printf("%s %s() Exiting OAI softmodem: %s\n",__FILE__, __FUNCTION__, s);
|
||||
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
|
||||
}
|
||||
|
||||
oai_exit = 1;
|
||||
@@ -345,11 +345,11 @@ void exit_fun(const char* s)
|
||||
}
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
sleep(1); //allow lte-softmodem threads to exit first
|
||||
#if defined(ENABLE_ITTI)
|
||||
itti_terminate_tasks (TASK_UNKNOWN);
|
||||
#endif
|
||||
|
||||
exit(1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +240,6 @@ extern volatile int start_UE;
|
||||
#include "threads_t.h"
|
||||
extern threads_t threads;
|
||||
|
||||
extern void exit_fun(const char* s);
|
||||
// In lte-enb.c
|
||||
extern void init_eNB(int single_thread_flag,int wait_for_sync);
|
||||
extern void stop_eNB(int);
|
||||
|
||||
@@ -322,13 +322,13 @@ void signal_handler(int sig) {
|
||||
|
||||
|
||||
|
||||
void exit_fun(const char* s)
|
||||
void exit_function(const char* file, const char* function, const int line, const char* s)
|
||||
{
|
||||
int CC_id;
|
||||
|
||||
logClean();
|
||||
if (s != NULL) {
|
||||
printf("%s %s() Exiting OAI softmodem: %s\n",__FILE__, __FUNCTION__, s);
|
||||
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
|
||||
}
|
||||
|
||||
oai_exit = 1;
|
||||
@@ -341,10 +341,11 @@ void exit_fun(const char* s)
|
||||
PHY_vars_UE_g[0][CC_id]->rfdevice.trx_end_func(&PHY_vars_UE_g[0][CC_id]->rfdevice);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
sleep(1); //allow lte-softmodem threads to exit first
|
||||
#if defined(ENABLE_ITTI)
|
||||
itti_terminate_tasks (TASK_UNKNOWN);
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef XFORMS
|
||||
|
||||
Reference in New Issue
Block a user