mirror of
https://github.com/coturn/coturn.git
synced 2025-10-27 04:51:28 +01:00
log reset CLI command
This commit is contained in:
parent
1c28566087
commit
a70f1f9e23
@ -2,6 +2,7 @@
|
||||
Version 4.0.1.3 'Severard':
|
||||
- Logfile reset on SIGHUP
|
||||
(Gustavo Garcia suggestion).
|
||||
- Log reset CLi command.
|
||||
|
||||
06/06/2014 Oleg Moskalenko <mom040267@gmail.com>
|
||||
Version 4.0.1.2 'Severard':
|
||||
|
||||
@ -132,6 +132,8 @@ static const char *CLI_HELP_STR[] =
|
||||
"",
|
||||
" pu [udp|tcp|dtls|tls]- print current users",
|
||||
"",
|
||||
" lr - log reset",
|
||||
"",
|
||||
" aas ip[:port} - add an alternate server reference",
|
||||
" das ip[:port] - delete an alternate server reference",
|
||||
" atas ip[:port] - add a TLS alternate server reference",
|
||||
@ -191,6 +193,14 @@ static void myprintf(struct cli_session *cs, const char *format, ...)
|
||||
}
|
||||
}
|
||||
|
||||
static void log_reset(struct cli_session* cs)
|
||||
{
|
||||
if(cs) {
|
||||
reset_rtpprintf();
|
||||
myprintf(cs," log reset done\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void print_str_array(struct cli_session* cs, const char** sa)
|
||||
{
|
||||
if(cs && sa) {
|
||||
@ -1012,6 +1022,9 @@ static int run_cli_input(struct cli_session* cs, const char *buf0, unsigned int
|
||||
} else if(strstr(cmd,"ps") == cmd) {
|
||||
print_sessions(cs,cmd+2,1,0);
|
||||
type_cli_cursor(cs);
|
||||
} else if(strstr(cmd,"lr") == cmd) {
|
||||
log_reset(cs);
|
||||
type_cli_cursor(cs);
|
||||
} else if(strstr(cmd,"cc ") == cmd) {
|
||||
change_cli_param(cs,cmd+3);
|
||||
type_cli_cursor(cs);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user