From 998925c90a7ffa3dc6c4bf715699565dac49c10c Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 4 Jul 2013 01:19:40 -0400 Subject: Fix rehashing via SIGHUP and m_mysql --- modules/extra/m_mysql.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/extra/m_mysql.cpp') diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 3b8715c52..79198a814 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -189,7 +189,7 @@ class ModuleSQL : public Module, public Pipe void OnReload(Configuration::Conf *conf) anope_override { Configuration::Block *config = Config->GetModule(this); - int i, num; + int i; for (std::map::iterator it = this->MySQLServices.begin(); it != this->MySQLServices.end();) { @@ -201,7 +201,7 @@ class ModuleSQL : public Module, public Pipe if (Config->GetBlock("mysql", i)->Get("name", "main") == cname) break; - if (i == num) + if (i == Config->CountBlock("mysql")) { Log(LOG_NORMAL, "mysql") << "MySQL: Removing server connection " << cname; -- cgit