mirror of
https://github.com/coturn/coturn.git
synced 2025-10-26 20:41:07 +01:00
log file reset on SIGHUP
This commit is contained in:
parent
4ec7670508
commit
1c28566087
@ -1,3 +1,8 @@
|
||||
06/13/2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
Version 4.0.1.3 'Severard':
|
||||
- Logfile reset on SIGHUP
|
||||
(Gustavo Garcia suggestion).
|
||||
|
||||
06/06/2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
Version 4.0.1.2 'Severard':
|
||||
- Bandwidth draft implemented.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
# Common settings script.
|
||||
|
||||
TURNVERSION=4.0.1.2
|
||||
TURNVERSION=4.0.1.3
|
||||
BUILDDIR=~/rpmbuild
|
||||
ARCH=`uname -p`
|
||||
TURNSERVER_SVN_URL=http://coturn.googlecode.com/svn
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
Name: turnserver
|
||||
Version: 4.0.1.2
|
||||
Version: 4.0.1.3
|
||||
Release: 0%{dist}
|
||||
Summary: Coturn TURN Server
|
||||
|
||||
@ -289,6 +289,8 @@ fi
|
||||
%{_includedir}/turn/client/TurnMsgLib.h
|
||||
|
||||
%changelog
|
||||
* Fri Jun 13 2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
- Sync to 4.0.1.3
|
||||
* Fri Jun 06 2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
- Sync to 4.0.1.2
|
||||
* Sun May 18 2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
|
||||
@ -42,6 +42,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
////////// LOG TIME OPTIMIZATION ///////////
|
||||
|
||||
static volatile turn_time_t log_start_time = 0;
|
||||
@ -337,11 +339,20 @@ static void set_log_file_name_func(char *base, char *f, size_t fsz)
|
||||
turn_free(tail,strlen(tail)+1);
|
||||
}
|
||||
|
||||
static void sighup_callback_handler(int signum)
|
||||
{
|
||||
if(signum == SIGHUP) {
|
||||
printf("%s: resetting the log file\n",__FUNCTION__);
|
||||
reset_rtpprintf();
|
||||
}
|
||||
}
|
||||
|
||||
static void set_rtpfile(void)
|
||||
{
|
||||
if(to_syslog) {
|
||||
return;
|
||||
} else if (!_rtpfile) {
|
||||
signal(SIGHUP, sighup_callback_handler);
|
||||
if(log_fn_base[0]) {
|
||||
if(!strcmp(log_fn_base,"syslog")) {
|
||||
_rtpfile = stdout;
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#ifndef __IOADEFS__
|
||||
#define __IOADEFS__
|
||||
|
||||
#define TURN_SERVER_VERSION "4.0.1.2"
|
||||
#define TURN_SERVER_VERSION "4.0.1.3"
|
||||
#define TURN_SERVER_VERSION_NAME "Severard"
|
||||
#define TURN_SOFTWARE "Coturn-"TURN_SERVER_VERSION" '"TURN_SERVER_VERSION_NAME"'"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user