]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Of course, it DOES help to actually initialise the Mutex objects, and delete them...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 4 Sep 2008 21:43:42 +0000 (21:43 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 4 Sep 2008 21:43:42 +0000 (21:43 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10390 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/extra/m_mysql.cpp

index a4590245499f36e2886e6494d36f8f04cc61bad0..8bc0a276be86e752968f98bde21c3173fe8dde11 100644 (file)
@@ -744,6 +744,10 @@ ModuleSQL::ModuleSQL(InspIRCd* Me) : Module::Module(Me), rehashing(false)
        Dispatcher = new DispatcherThread(ServerInstance, this);
        ServerInstance->Threads->Create(Dispatcher);
 
+       LoggingMutex = ServerInstance->Mutexes->CreateMutex();
+       ResultsMutex = ServerInstance->Mutexes->CreateMutex();
+       QueueMutex = ServerInstance->Mutexes->CreateMutex();
+
        if (!ServerInstance->Modules->PublishFeature("SQL", this))
        {
                /* Tell worker thread to exit NOW,
@@ -765,10 +769,11 @@ ModuleSQL::~ModuleSQL()
        ServerInstance->Modules->UnpublishInterface("SQL", this);
        ServerInstance->Modules->UnpublishFeature("SQL");
        ServerInstance->Modules->DoneWithInterface("SQLutils");
+       delete LoggingMutex;
+       delete ResultsMutex;
+       delete QueueMutex;
 }
 
-
-
 unsigned long ModuleSQL::NewID()
 {
        if (currid+1 == 0)