diff options
-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) |