aboutsummaryrefslogtreecommitdiff
path: root/modules/log_sql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/log_sql.cpp')
-rw-r--r--modules/log_sql.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/log_sql.cpp b/modules/log_sql.cpp
index aaa505252..cc46c2459 100644
--- a/modules/log_sql.cpp
+++ b/modules/log_sql.cpp
@@ -22,14 +22,14 @@
namespace
{
- Module* thismod;
+ WeakModulePtr thismod;
}
class SQLQuery final
: public SQL::Query
{
public:
- SQLQuery(Module* mod) ATTR_NOT_NULL(2)
+ SQLQuery(const WeakModulePtr& mod)
: SQL::Query(mod)
{
}
@@ -88,7 +88,7 @@ class SQLEngine final
: public Log::Engine
{
public:
- SQLEngine(Module* Creator) ATTR_NOT_NULL(2)
+ SQLEngine(const WeakModulePtr& Creator)
: Log::Engine(Creator, "sql")
{
}
@@ -110,11 +110,10 @@ private:
public:
ModuleLogSQL()
: Module(VF_VENDOR, "Provides the ability to log to a SQL database.")
- , engine(this)
+ , engine(weak_from_this())
{
- thismod = this;
+ thismod = weak_from_this();
}
-
};
MODULE_INIT(ModuleLogSQL)