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:
Vladimir DubrovinandClaude Opus 5.5 committed 2026-10-13 19:12:54 +03:00
1 parent 8bd5c0f0fa
commit 737bdc7d24
19 files changed
+398 -389

No files matched your search

+3 -2
View File
@@ -225,9 +225,10 @@ extern time_t basetime;
extern int timetoexit, needreload;
extern time_t curtime; /* the clock, kept by the main thread */
extern struct extparam conf;
extern struct extparam *conf;
extern const struct extparam confdefaults;
extern struct extparam confboot;
extern int timeouts[12];
/* directions sockmap() passes with splice(): -s1, -s2, -s3; with
SPLICE_AUTO (-s alone, -s5 to -s7) only when it pays */