From 77954a2e31213ce355e9e319229c767dfbd698a4 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 4 Sep 2008 21:43:42 +0000 Subject: Of course, it DOES help to actually initialise the Mutex objects, and delete them on shutdown after the thread is gone git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10390 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_mysql.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index a45902454..8bc0a276b 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -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) -- cgit v1.2.3