]> granicus.if.org Git - pdns/commitdiff
Shrink Bind2Backend from 296 to 288 bytes
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 27 May 2015 11:25:44 +0000 (13:25 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Fri, 19 Jun 2015 20:51:49 +0000 (22:51 +0200)
modules/bindbackend/bindbackend2.hh

index fff23fa95fa3eca67be0d225ab9a1ca0e2436ec9..4fdfb72c2f5ab77d28167189f7b2ba0f9b39fd2b 100644 (file)
@@ -249,7 +249,6 @@ private:
   static bool safeRemoveBBDomainInfo(const std::string& name);
   bool GetBBDomainInfo(int id, BB2DomainInfo** bbd);
   shared_ptr<SSQLite3> d_dnssecdb;
-  bool d_hybrid;
   bool getNSEC3PARAM(const std::string& zname, NSEC3PARAMRecordContent* ns3p);
   class handle
   {
@@ -265,6 +264,7 @@ private:
     recordstorage_t::const_iterator d_qname_end;
     string qname;
     string domain;
+
     int id;
     QType qtype;
     bool d_list;
@@ -278,21 +278,32 @@ private:
     handle(const handle &);
   };
 
-  static int s_first;                                  //!< this is raised on construction to prevent multiple instances of us being generated
-  static bool s_ignore_broken_records;
+  SSqlStatement* d_getAllDomainMetadataQuery_stmt;
+  SSqlStatement* d_getDomainMetadataQuery_stmt;
+  SSqlStatement* d_deleteDomainMetadataQuery_stmt;
+  SSqlStatement* d_insertDomainMetadataQuery_stmt;
+  SSqlStatement* d_getDomainKeysQuery_stmt;
+  SSqlStatement* d_deleteDomainKeyQuery_stmt;
+  SSqlStatement* d_insertDomainKeyQuery_stmt;
+  SSqlStatement* d_activateDomainKeyQuery_stmt;
+  SSqlStatement* d_deactivateDomainKeyQuery_stmt;
+  SSqlStatement* d_getTSIGKeyQuery_stmt;
+  SSqlStatement* d_setTSIGKeyQuery_stmt;
+  SSqlStatement* d_deleteTSIGKeyQuery_stmt;
+  SSqlStatement* d_getTSIGKeysQuery_stmt;
 
-  static string s_binddirectory;                              //!< this is used to store the 'directory' setting of the bind configuration
+  string d_transaction_tmpname;
   string d_logprefix;
-
   set<string> alsoNotify; //!< this is used to store the also-notify list of interested peers.
-
-  BB2DomainInfo createDomainEntry(const string &domain, const string &filename); //!< does not insert in s_state
-
-  int d_transaction_id;
-  string d_transaction_tmpname;
-
   ofstream *d_of;
   handle d_handle;
+  static string s_binddirectory;                              //!< this is used to store the 'directory' setting of the bind configuration
+  static int s_first;                                  //!< this is raised on construction to prevent multiple instances of us being generated
+  int d_transaction_id;
+  static bool s_ignore_broken_records;
+  bool d_hybrid;
+
+  BB2DomainInfo createDomainEntry(const string &domain, const string &filename); //!< does not insert in s_state
 
   void queueReloadAndStore(unsigned int id);
   bool findBeforeAndAfterUnhashed(BB2DomainInfo& bbd, const std::string& qname, std::string& unhashed, std::string& before, std::string& after);
@@ -306,19 +317,6 @@ private:
   void loadConfig(string *status=0);
   static void nukeZoneRecords(BB2DomainInfo *bbd);
 
-  SSqlStatement* d_getAllDomainMetadataQuery_stmt;
-  SSqlStatement* d_getDomainMetadataQuery_stmt;
-  SSqlStatement* d_deleteDomainMetadataQuery_stmt;
-  SSqlStatement* d_insertDomainMetadataQuery_stmt;
-  SSqlStatement* d_getDomainKeysQuery_stmt;
-  SSqlStatement* d_deleteDomainKeyQuery_stmt;
-  SSqlStatement* d_insertDomainKeyQuery_stmt;
-  SSqlStatement* d_activateDomainKeyQuery_stmt;
-  SSqlStatement* d_deactivateDomainKeyQuery_stmt;
-  SSqlStatement* d_getTSIGKeyQuery_stmt;
-  SSqlStatement* d_setTSIGKeyQuery_stmt;
-  SSqlStatement* d_deleteTSIGKeyQuery_stmt;
-  SSqlStatement* d_getTSIGKeysQuery_stmt;
 };
 
 #endif /* PDNS_BINDBACKEND_HH */