From: Aki Tuomi Date: Fri, 11 Dec 2015 14:49:43 +0000 (+0200) Subject: Use pdns_stou in odbxbackend X-Git-Tag: dnsdist-1.0.0-alpha1~34^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21df0d2776bf0cbef1674b3f2b152d42036bb1dd;p=thirdparty%2Fpdns.git Use pdns_stou in odbxbackend --- diff --git a/modules/opendbxbackend/odbxbackend.cc b/modules/opendbxbackend/odbxbackend.cc index ea2f59e137..372715a2c5 100644 --- a/modules/opendbxbackend/odbxbackend.cc +++ b/modules/opendbxbackend/odbxbackend.cc @@ -666,12 +666,11 @@ bool OdbxBackend::feedRecord( const DNSResourceRecord& rr, string *ordername ) string tmp = rr.qname.toStringNoDot(); - int priority=0; + unsigned int priority=0; string content(rr.content); if(rr.qtype == QType::MX || rr.qtype == QType::SRV) { - priority=atoi(content.c_str()); - + priority=pdns_stou(content); string::size_type pos = content.find_first_not_of("0123456789"); if(pos != string::npos) boost::erase_head(content, pos);