]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Make the message when reloading a command fails more accurate, and fix reloading...
[user/henk/code/inspircd.git] / src / inspircd.cpp
index a921db193514338a9a0bdb31adefe6680f2d4f98..ab67449a2abeb1f55b4ebd635aec1477b5a59a60 100644 (file)
@@ -3,7 +3,7 @@
  *       +------------------------------------+
  *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *         the file COPYING for details.
@@ -151,8 +151,6 @@ void InspIRCd::Cleanup()
        /* Close logging */
        this->Logs->CloseLogs();
        DeleteZero(this->Logs);
-
-       delete RehashFinishMutex;
 }
 
 void InspIRCd::Restart(const std::string &reason)
@@ -391,10 +389,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
        SE = SEF->Create(this);
        delete SEF;
 
-       ThreadEngineFactory* tef = new ThreadEngineFactory();
-       this->Threads = tef->Create(this);
-       delete tef;
-       this->Mutexes = new MutexFactory(this);
+       this->Threads = new ThreadEngine(this);
 
        /* Default implementation does nothing */
        this->PI = new ProtocolInterface(this);
@@ -756,8 +751,6 @@ int InspIRCd::Run()
                Exit(0);
        }
 
-       RehashFinishMutex = Mutexes->CreateMutex();
-
        while (true)
        {
 #ifndef WIN32
@@ -769,8 +762,7 @@ int InspIRCd::Run()
 #endif
 
                /* Check if there is a config thread which has finished executing but has not yet been freed */
-               RehashFinishMutex->Lock();
-               if (this->ConfigThread && this->ConfigThread->GetExitFlag())
+               if (this->ConfigThread && this->ConfigThread->IsDone())
                {
                        /* Rehash has completed */
 
@@ -805,7 +797,6 @@ int InspIRCd::Run()
                        delete ConfigThread;
                        ConfigThread = NULL;
                }
-               RehashFinishMutex->Unlock();
 
                /* time() seems to be a pretty expensive syscall, so avoid calling it too much.
                 * Once per loop iteration is pleanty.