mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 02:25:40 +08:00
Revert "Fixed: logrotation may stop after config change"
This reverts commit ede4aee619
.
This commit is contained in:
parent
ede4aee619
commit
d7373be071
@ -285,6 +285,10 @@ static int h_log(int argc, unsigned char ** argv){
|
||||
|
||||
|
||||
havelog = 1;
|
||||
if(argc > 1 && conf.logtarget && *argv[1]!= '&' && *argv[1]!= '@' && !strcmp((char *)conf.logtarget, (char *)argv[1])) {
|
||||
conf.logfunc = logstdout;
|
||||
return 0;
|
||||
}
|
||||
if(conf.logtarget){
|
||||
myfree(conf.logtarget);
|
||||
conf.logtarget = NULL;
|
||||
@ -319,7 +323,6 @@ static int h_log(int argc, unsigned char ** argv){
|
||||
if(argc > 2) {
|
||||
conf.logtype = getrotate(*argv[2]);
|
||||
}
|
||||
if(!strcmp((char *)conf.logtarget, (char *)argv[1])) return 0;
|
||||
conf.logtime = time(0);
|
||||
if(conf.logname)myfree(conf.logname);
|
||||
conf.logname = (unsigned char *)mystrdup((char *)argv[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user