diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-22 11:25:49 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-22 11:25:49 +0000 |
commit | 56e74d495ce25d15a769c2c271bf2cad45d7a587 (patch) | |
tree | 0d8a2614348414fb35f1bf4b1374020a661132ef /src/modules | |
parent | d36316f767c6d16130125c67dea4afb4f0f85311 (diff) |
Stop publishing MySQL feature - check for successful publishing of SQL feature
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4504 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 83bccb1dc..6825f45c1 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -783,8 +783,12 @@ class ModuleSQL : public Module { throw ModuleException("m_mysql: Failed to create dispatcher thread: " + std::string(strerror(errno))); } - Srv->PublishFeature("SQL", this); - Srv->PublishFeature("MySQL", this); + if (!Srv->PublishFeature("SQL", this)) + { + /* Tell worker thread to exit NOW */ + giveup = true; + throw ModuleException("m_mysql: Unable to publish feature 'SQL'"); + } } virtual ~ModuleSQL() |