diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-04 21:43:42 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-09-04 21:43:42 +0000 |
commit | 77954a2e31213ce355e9e319229c767dfbd698a4 (patch) | |
tree | 77e8299e4a8a1f92b7c1338257510cb4d341cb21 /src/modules | |
parent | 235718102e8badf933c2a3ceda7ce64d1804bcc4 (diff) |
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
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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) |