mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-26 23:59:41 +08:00
Reach the configuration through a pointer
conf is now a pointer to the current configuration rather than the structure itself: at first confboot, which exists before main() runs, as plugins and the standalone services use it too; later configurations will start from confdefaults. Both are made from confinit.h, the one list of initial values. The timeouts are an array of the configuration instead of a pointer to a global one. Nothing behaves differently yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8bd5c0f0fa
commit
737bdc7d24
19 files changed
+398
-389
No files matched your search
+1
-1
@@ -1048,7 +1048,7 @@ for(;;){
|
||||
hlen += sprintf((char*)buf + hlen, "Via: 1.1 ");
|
||||
gethostname((char *)(buf + hlen), 256);
|
||||
hlen += (int)strlen((char *)(buf + hlen));
|
||||
hlen += sprintf((char*)buf + hlen, ":%d (%s %s)\r\nX-Forwarded-For: ", (int)ntohs(*SAPORT(¶m->srv->intsa)), conf.stringtable?conf.stringtable[2]:(unsigned char *)"", conf.stringtable?conf.stringtable[3]:(unsigned char *)"");
|
||||
hlen += sprintf((char*)buf + hlen, ":%d (%s %s)\r\nX-Forwarded-For: ", (int)ntohs(*SAPORT(¶m->srv->intsa)), conf->stringtable?conf->stringtable[2]:(unsigned char *)"", conf->stringtable?conf->stringtable[3]:(unsigned char *)"");
|
||||
if(anonymous != 2)hlen += myinet_ntop(*SAFAMILY(¶m->sincr), SAADDR(¶m->sincr), (char *)buf + hlen, 128);
|
||||
else {
|
||||
uint32_t tmp = myrand();
|
||||
|
||||
Reference in new issue
Block a user