diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-22 16:54:32 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-22 16:54:32 +0000 |
commit | 9bddcf91ac79f34f8721bbf161f90cc4cc9dbe8c (patch) | |
tree | 7fb6284977dbd4f94e5e34b08f0a7311ed854075 /include | |
parent | f7844096dcbe912557b46b0a52b35cf7cf6fc07e (diff) |
Thread safety fixes to avoid crashes on rehash, dont reopen logs within the rehash thread. Put this in the safe part of the rehash operation, after the thread exits. Put a mutex around the part where the thread exits, just in case somehow there are two rehash threads exiting at the same time due to user
muppetry.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10811 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 3993142c7..85c2f62e6 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -390,6 +390,8 @@ class CoreExport InspIRCd : public classbase */ std::map<BufferedSocket*,BufferedSocket*> SocketCull; + Mutex* RehashFinishMutex; + /** Globally accessible fake user record. This is used to force mode changes etc across s2s, etc.. bit ugly, but.. better than how this was done in 1.1 * Reason for it: * kludge alert! @@ -398,7 +400,7 @@ class CoreExport InspIRCd : public classbase * hash and set its descriptor to FD_MAGIC_NUMBER so the data * falls into the abyss :p */ - User *FakeClient; + User* FakeClient; /** Returns the next available UID for this server. */ @@ -408,13 +410,13 @@ class CoreExport InspIRCd : public classbase * @param nick The nickname to find * @return A pointer to the user, or NULL if the user does not exist */ - User *FindUUID(const std::string &); + User* FindUUID(const std::string &); /** Find a user in the UUID hash * @param nick The nickname to find * @return A pointer to the user, or NULL if the user does not exist */ - User *FindUUID(const char *); + User* FindUUID(const char *); /** Build the ISUPPORT string by triggering all modules On005Numeric events */ |