From: Bert Hubert Date: Mon, 31 Jan 2011 10:14:13 +0000 (+0000) Subject: remove qtype char* constructor X-Git-Tag: auth-3.0~303 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7660b74a5528771d8caa30314789b1e8dd9e2bd1;p=thirdparty%2Fpdns.git remove qtype char* constructor git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1944 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 1bbfa48770..e259bc0c79 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -120,7 +120,7 @@ int PacketHandler::findMboxFW(DNSPacket *p, DNSPacket *r, string &target) if(!getAuth(p, &sd, target, &zoneId)) return false; - B.lookup("MBOXFW",string("%@")+target,p, zoneId); + B.lookup(QType(QType::MBOXFW),string("%@")+target,p, zoneId); while(B.get(rr)) wedoforward=true; @@ -145,7 +145,7 @@ int PacketHandler::findUrl(DNSPacket *p, DNSPacket *r, string &target) bool found=false; - B.lookup("URL",target,p); // search for a URL before we search for an A + B.lookup(QType(QType::URL),target,p); // search for a URL before we search for an A while(B.get(rr)) { if(!found) @@ -164,7 +164,7 @@ int PacketHandler::findUrl(DNSPacket *p, DNSPacket *r, string &target) // now try CURL - B.lookup("CURL",target,p); // search for a URL before we search for an A + B.lookup(QType(QType::CURL),target,p); // search for a URL before we search for an A while(B.get(rr)) { if(!found) diff --git a/pdns/qtype.cc b/pdns/qtype.cc index b6c5ebd445..55e5aaea4d 100644 --- a/pdns/qtype.cc +++ b/pdns/qtype.cc @@ -134,12 +134,6 @@ QType::QType(uint16_t n) code=n; } -QType::QType(const char *p) -{ - QType(); - code=chartocode(p); -} - string DNSResourceRecord::serialize() const { ostringstream ostr; diff --git a/pdns/qtype.hh b/pdns/qtype.hh index 46ec6eba9d..72b1e7c54a 100644 --- a/pdns/qtype.hh +++ b/pdns/qtype.hh @@ -47,7 +47,6 @@ class QType public: QType(); //!< Naked constructor explicit QType(uint16_t); //!< convert from an integer to a QType - QType(const char *p); //!< convert from a char* to a QType QType(const QType& orig) : code(orig.code) { }