summaryrefslogtreecommitdiff
path: root/include/inspircd.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-07-01 22:55:46 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-07-01 22:55:46 +0000
commitc384697c88aa54b5a532cd2edce3c063c70d7868 (patch)
tree3fc454072b3956f241b091265f606bb9c6ca7f67 /include/inspircd.h
parent50eebfeac8ebe501b021ebf62b0b01464fd79a21 (diff)
Make rehash generate a new ServerInstance->Config object
This makes it possible to cancel a pending rehash, and fixes possible threading issues with rehash and other events. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11424 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/inspircd.h')
-rw-r--r--include/inspircd.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index afe4dcd7c..ef6c86f28 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -290,12 +290,12 @@ class BanCacheManager;
class CoreExport ConfigReaderThread : public Thread
{
InspIRCd* ServerInstance;
- bool do_bail;
+ ServerConfig* Config;
bool done;
- std::string TheUserUID;
public:
- ConfigReaderThread(InspIRCd* Instance, bool bail, const std::string &useruid)
- : Thread(), ServerInstance(Instance), do_bail(bail), done(false), TheUserUID(useruid)
+ std::string TheUserUID;
+ ConfigReaderThread(InspIRCd* Instance, const std::string &useruid)
+ : Thread(), ServerInstance(Instance), done(false), TheUserUID(useruid)
{
}
@@ -304,6 +304,8 @@ class CoreExport ConfigReaderThread : public Thread
}
void Run();
+ /** Run in the main thread to apply the configuration */
+ void Finish();
bool IsDone() { return done; }
};
@@ -536,11 +538,9 @@ class CoreExport InspIRCd : public classbase
caller1<void, User*> ProcessUser;
/** Bind all ports specified in the configuration file.
- * @param bail True if the function should bail back to the shell on failure
- * @param found_ports The actual number of ports found in the config, as opposed to the number actually bound
- * @return The number of ports actually bound without error
+ * @return The number of ports bound without error
*/
- int BindPorts(bool bail, int &found_ports, FailedPortList &failed_ports);
+ int BindPorts(FailedPortList &failed_ports);
/** Binds a socket on an already open file descriptor
* @param sockfd A valid file descriptor of an open socket