Commit 6db3311b authored by zhenghuangkun's avatar zhenghuangkun

log_men init flag add

parent 7a1d0bb8
......@@ -47,6 +47,7 @@
log_mem_cnt_t log_mem_d[2];
int log_mem_flag=0;
int log_mem_initflag=0;
int log_mem_multi=1;
volatile int log_mem_side=0;
pthread_mutex_t log_mem_lock;
......@@ -877,6 +878,7 @@ int logInit_log_mem (void)
log_mem_d[1].enable_flag=0;
}
log_mem_initflag = 1;
printf("log init done\n");
return 0;
......
......@@ -28,5 +28,6 @@ extern mapping log_level_names[];
extern mapping log_options[];
extern mapping log_maskmap[];
extern int log_mem_flag;
extern int log_mem_initflag;
extern char * log_mem_filename;
extern char logmem_filename[1024];
......@@ -261,7 +261,11 @@ void exit_function(const char *file, const char *function, const int line, const
if (s != NULL) {
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
}
close_log_mem();
if(log_mem_initflag) {
close_log_mem();
}
oai_exit = 1;
if (RC.ru == NULL)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment