Commit 6db3311b authored by zhenghuangkun's avatar zhenghuangkun

log_men init flag add

parent 7a1d0bb8
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
log_mem_cnt_t log_mem_d[2]; log_mem_cnt_t log_mem_d[2];
int log_mem_flag=0; int log_mem_flag=0;
int log_mem_initflag=0;
int log_mem_multi=1; int log_mem_multi=1;
volatile int log_mem_side=0; volatile int log_mem_side=0;
pthread_mutex_t log_mem_lock; pthread_mutex_t log_mem_lock;
...@@ -877,6 +878,7 @@ int logInit_log_mem (void) ...@@ -877,6 +878,7 @@ int logInit_log_mem (void)
log_mem_d[1].enable_flag=0; log_mem_d[1].enable_flag=0;
} }
log_mem_initflag = 1;
printf("log init done\n"); printf("log init done\n");
return 0; return 0;
......
...@@ -28,5 +28,6 @@ extern mapping log_level_names[]; ...@@ -28,5 +28,6 @@ extern mapping log_level_names[];
extern mapping log_options[]; extern mapping log_options[];
extern mapping log_maskmap[]; extern mapping log_maskmap[];
extern int log_mem_flag; extern int log_mem_flag;
extern int log_mem_initflag;
extern char * log_mem_filename; extern char * log_mem_filename;
extern char logmem_filename[1024]; extern char logmem_filename[1024];
...@@ -261,7 +261,11 @@ void exit_function(const char *file, const char *function, const int line, const ...@@ -261,7 +261,11 @@ void exit_function(const char *file, const char *function, const int line, const
if (s != NULL) { if (s != NULL) {
printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s); printf("%s:%d %s() Exiting OAI softmodem: %s\n",file,line, function, s);
} }
if(log_mem_initflag) {
close_log_mem(); close_log_mem();
}
oai_exit = 1; oai_exit = 1;
if (RC.ru == NULL) 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