mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Keep the clock, timetoexit and needreload out of conf
They are the state of the process, not configuration: conf.time (now curtime), timetoexit and needreload are globals of their own. Plugins reach needreload through a pointer added at the end of struct pluginlink; LdapPlugin uses it. The extern for a paused global, never defined, goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3b2d664563
commit
a2592f4038
15 files changed
+61
-58
No files matched your search
+6
-6
@@ -27,9 +27,9 @@ int startconnlims (struct clientparam *param){
|
||||
ce->rating++;
|
||||
continue;
|
||||
}
|
||||
delta = conf.time - ce->basetime;
|
||||
if(ce->period <= delta || ce->basetime > conf.time){
|
||||
ce->basetime = conf.time;
|
||||
delta = curtime - ce->basetime;
|
||||
if(ce->period <= delta || ce->basetime > curtime){
|
||||
ce->basetime = curtime;
|
||||
ce->rating = 0x100000;
|
||||
continue;
|
||||
}
|
||||
@@ -39,7 +39,7 @@ int startconnlims (struct clientparam *param){
|
||||
break;
|
||||
}
|
||||
ce->rating = rating;
|
||||
ce->basetime = conf.time;
|
||||
ce->basetime = curtime;
|
||||
}
|
||||
}
|
||||
if(ret) {
|
||||
@@ -185,7 +185,7 @@ void trafcountfunc(struct clientparam *param){
|
||||
continue;
|
||||
}
|
||||
tc->traf64 += param->statssrv64;
|
||||
tc->updated = conf.time;
|
||||
tc->updated = curtime;
|
||||
}
|
||||
}
|
||||
if(countout) for(tc = conf.trafcounter; tc; tc = tc->next) {
|
||||
@@ -195,7 +195,7 @@ void trafcountfunc(struct clientparam *param){
|
||||
continue;
|
||||
}
|
||||
tc->traf64 += param->statscli64;
|
||||
tc->updated = conf.time;
|
||||
tc->updated = curtime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user