diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 17:01:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 17:01:00 +0000 |
commit | 5e1f2c1728b200951c0f192f2e2c6b83d53c879c (patch) | |
tree | f9654b9cf65fa8548158dde177da7723c807753d /include/configreader.h | |
parent | 7eebbe7da15a834c717f0fa279a300ee18c08b04 (diff) |
In prep for remote includes, configuration reading is now two-pass.
Note that theres an important part missing from here, there can be a NON-BLOCKING delay between the start of pass 2 and the files being available for download.
At this point, ServerConfig::Read() should probably return an ENOTREADY or such at which point it gets monitored for ready state. The socket engine is ready at this point
so we can poll the socket engine for it. In the case of startup, the socket engine blocks in a private loop, its no good booting the ircd till we have a complete config!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8565 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/configreader.h')
-rw-r--r-- | include/configreader.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/configreader.h b/include/configreader.h index 617059cf4..394d7f0f6 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -232,11 +232,11 @@ class CoreExport ServerConfig : public Extensible * configutation, appending errors to errorstream * and setting error if an error has occured. */ - bool ParseLine(ConfigDataHash &target, std::string &line, long &linenumber, std::ostringstream &errorstream); + bool ParseLine(ConfigDataHash &target, std::string &line, long &linenumber, std::ostringstream &errorstream, int pass); /** Process an include directive */ - bool DoInclude(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream); + bool DoInclude(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream, int pass); /** Check that there is only one of each configuration item */ @@ -643,12 +643,12 @@ class CoreExport ServerConfig : public Extensible /** Load 'filename' into 'target', with the new config parser everything is parsed into * tag/key/value at load-time rather than at read-value time. */ - bool LoadConf(ConfigDataHash &target, const char* filename, std::ostringstream &errorstream); + bool LoadConf(ConfigDataHash &target, const char* filename, std::ostringstream &errorstream, int pass); /** Load 'filename' into 'target', with the new config parser everything is parsed into * tag/key/value at load-time rather than at read-value time. */ - bool LoadConf(ConfigDataHash &target, const std::string &filename, std::ostringstream &errorstream); + bool LoadConf(ConfigDataHash &target, const std::string &filename, std::ostringstream &errorstream, int pass); /* Both these return true if the value existed or false otherwise */ |