diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-22 15:10:40 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-22 15:10:40 +0000 |
commit | 20bf4e0a20cb42f02f361bd955dad9516b4201b9 (patch) | |
tree | 1d3b89a07d693d3ae5aac967cbbff874d31adf03 /src/modules/extra | |
parent | 923818f50753d7a4fbc24b98440489c30bf39f78 (diff) |
Fixed crash-n-burn on rehash
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1163 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/extra')
-rw-r--r-- | src/modules/extra/m_sql.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/extra/m_sql.cpp b/src/modules/extra/m_sql.cpp index 2148ec3de..5aee87a70 100644 --- a/src/modules/extra/m_sql.cpp +++ b/src/modules/extra/m_sql.cpp @@ -159,10 +159,6 @@ class SQLConnection return Enabled; } - ~SQLConnection() - { - mysql_close(&connection); - } }; typedef std::vector<SQLConnection> ConnectionList; @@ -195,6 +191,7 @@ class ModuleSQL : public Module { Srv->Log(DEFAULT,"SQL: Loading database settings"); Connections.clear(); + Srv->Log(DEBUG,"Cleared connections"); for (int j =0; j < Conf->Enumerate("database"); j++) { std::string db = Conf->ReadValue("database","name",j); @@ -202,11 +199,13 @@ class ModuleSQL : public Module std::string pass = Conf->ReadValue("database","password",j); std::string host = Conf->ReadValue("database","hostname",j); std::string id = Conf->ReadValue("database","id",j); + Srv->Log(DEBUG,"Read database settings"); if ((db != "") && (host != "") && (user != "") && (id != "") && (pass != "")) { SQLConnection ThisSQL(host,user,pass,db,atoi(id.c_str())); Srv->Log(DEFAULT,"Loaded database: "+ThisSQL.GetHost()); Connections.push_back(ThisSQL); + Srv->Log(DEBUG,"Pushed back connection"); } } ConnectDatabases(); |