mirror of
https://github.com/coturn/coturn.git
synced 2025-10-30 14:31:29 +01:00
issue 19 fixed
This commit is contained in:
parent
0752c18b4d
commit
25000742f4
@ -236,6 +236,7 @@ static int to_syslog = 0;
|
|||||||
static int simple_log = 0;
|
static int simple_log = 0;
|
||||||
static char log_fn[FILE_STR_LEN]="\0";
|
static char log_fn[FILE_STR_LEN]="\0";
|
||||||
static char log_fn_base[FILE_STR_LEN]="\0";
|
static char log_fn_base[FILE_STR_LEN]="\0";
|
||||||
|
static volatile int to_reset_log_file = 0;
|
||||||
|
|
||||||
static turn_mutex log_mutex;
|
static turn_mutex log_mutex;
|
||||||
static int log_mutex_inited = 0;
|
static int log_mutex_inited = 0;
|
||||||
@ -344,13 +345,18 @@ static void set_log_file_name_func(char *base, char *f, size_t fsz)
|
|||||||
static void sighup_callback_handler(int signum)
|
static void sighup_callback_handler(int signum)
|
||||||
{
|
{
|
||||||
if(signum == SIGHUP) {
|
if(signum == SIGHUP) {
|
||||||
printf("%s: resetting the log file\n",__FUNCTION__);
|
to_reset_log_file = 1;
|
||||||
reset_rtpprintf();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_rtpfile(void)
|
static void set_rtpfile(void)
|
||||||
{
|
{
|
||||||
|
if(to_reset_log_file) {
|
||||||
|
printf("%s: resetting the log file\n",__FUNCTION__);
|
||||||
|
reset_rtpprintf();
|
||||||
|
to_reset_log_file = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(to_syslog) {
|
if(to_syslog) {
|
||||||
return;
|
return;
|
||||||
} else if (!_rtpfile) {
|
} else if (!_rtpfile) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user