]> granicus.if.org Git - pdns/commitdiff
fix case sensitivity in selecting domain type master or slave (horrible!)
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 16 Aug 2007 21:39:35 +0000 (21:39 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 16 Aug 2007 21:39:35 +0000 (21:39 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1084 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/backends/gsql/gsqlbackend.cc

index ab4ef2af39bf3b84731b0e70502a822ef611d898..aa8cb1cf5bb4d514a9da2f4e5485917776b53103 100644 (file)
@@ -16,8 +16,9 @@ using namespace std;
 #include "pdns/ahuexception.hh"
 #include "pdns/logger.hh"
 #include "pdns/arguments.hh"
-
+#include <boost/algorithm/string.hpp>
 #include <sstream>
+using namespace boost;
 
 void GSQLBackend::setNotified(uint32_t domain_id, uint32_t serial)
 {
@@ -93,7 +94,7 @@ bool GSQLBackend::getDomainInfo(const string &domain, DomainInfo &di)
   di.backend=this;
   
   string type=d_result[0][5];
-  if(type=="SLAVE") {
+  if(iequals(type,"SLAVE")) {
     di.serial=0;
     try {
       SOAData sd;
@@ -108,7 +109,7 @@ bool GSQLBackend::getDomainInfo(const string &domain, DomainInfo &di)
     
     di.kind=DomainInfo::Slave;
   }
-  else if(type=="MASTER")
+  else if(iequals(type,"MASTER"))
     di.kind=DomainInfo::Slave;
   else 
     di.kind=DomainInfo::Native;