From 9bddcf91ac79f34f8721bbf161f90cc4cc9dbe8c Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 22 Nov 2008 16:54:32 +0000 Subject: 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 --- include/inspircd.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') 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 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 */ -- cgit v1.2.3