]> granicus.if.org Git - pdns/commitdiff
properly initialize the doLog variable for ssqlite3, plus rename it (it is not static)
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 13 Nov 2012 09:48:42 +0000 (09:48 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 13 Nov 2012 09:48:42 +0000 (09:48 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2889 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/ssqlite3.cc
pdns/ssqlite3.hh

index 5598b044ab084be5c395a3a8ff514e91516b0b98..b9041ffc4677d00309358853a982eb4f2f0868f0 100644 (file)
@@ -31,12 +31,13 @@ SSQLite3::SSQLite3( const std::string & database, bool creat )
   if ( sqlite3_open( database.c_str(), &m_pDB)!=SQLITE_OK )
     throw sPerrorException( "Could not connect to the SQLite database '" + database + "'" );
   m_pStmt = 0;
+  m_dolog = 0;
   sqlite3_busy_handler(m_pDB, busyHandler, 0);
 }
 
 void SSQLite3::setLog(bool state)
 {
-  s_dolog=state;
+  m_dolog=state;
 }
 
 // Destructor.
@@ -86,7 +87,7 @@ int SSQLite3::doQuery( const std::string & query )
 {
   const char *pTail;
 
-  if(s_dolog)
+  if(m_dolog)
     L<<Logger::Warning<<"Query: "<<query<<endl;
   
   // Execute the query.
index 42c2502f2c232dce101dbb3b91b76bd7f74195ab..02670af5644ab1fdc79111df6e4be4dfd74403c1 100644 (file)
@@ -19,7 +19,7 @@ private:
   //! Pointer to the SQLite virtual machine executing a query.
   sqlite3_stmt *m_pStmt;
 
-  bool s_dolog;
+  bool m_dolog;
 
   static int busyHandler(void*, int);
 protected: