From: Bert Hubert Date: Sat, 15 Nov 2008 19:34:19 +0000 (+0000) Subject: further ::arg() stuff X-Git-Tag: rec-3.2~252 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43d347d3588e1aa1f7797488b906cc84ab817df0;p=pdns further ::arg() stuff git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1270 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnspacket.cc b/pdns/dnspacket.cc index e8ef9411e..5807e23ef 100644 --- a/pdns/dnspacket.cc +++ b/pdns/dnspacket.cc @@ -188,10 +188,10 @@ void fillSOAData(const string &content, SOAData &data) // fill out data with some plausible defaults: // 10800 3600 604800 3600 data.serial=0; - data.refresh=arg().asNum("soa-refresh-default"); - data.retry=arg().asNum("soa-retry-default"); - data.expire=arg().asNum("soa-expire-default"); - data.default_ttl=arg().asNum("soa-minimum-ttl"); + data.refresh=::arg().asNum("soa-refresh-default"); + data.retry=::arg().asNum("soa-retry-default"); + data.expire=::arg().asNum("soa-expire-default"); + data.default_ttl=::arg().asNum("soa-minimum-ttl"); vectorparts; stringtok(parts,content); @@ -296,7 +296,7 @@ void DNSPacket::wrapup(void) stable_sort(rrs.begin(),rrs.end(),rrcomp); - static bool mustShuffle =arg().mustDo("no-shuffle"); + static bool mustShuffle =::arg().mustDo("no-shuffle"); if(!d_tcp && !mustShuffle) { shuffle(rrs); diff --git a/pdns/nameserver.cc b/pdns/nameserver.cc index ca75f3b00..a2564fa39 100644 --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@ -79,7 +79,7 @@ extern StatBag S; void UDPNameserver::bindIPv4() { vectorlocals; - stringtok(locals,arg()["local-address"]," ,"); + stringtok(locals,::arg()["local-address"]," ,"); if(locals.empty()) throw AhuException("No local address specified"); @@ -114,15 +114,15 @@ void UDPNameserver::bindIPv4() locala.sin_addr.s_addr=*(int*)h->h_addr; } - locala.sin_port=htons(arg().asNum("local-port")); + locala.sin_port=htons(::arg().asNum("local-port")); - if(bind(s, (sockaddr*)&locala,sizeof(locala))<0) { + if(::bind(s, (sockaddr*)&locala,sizeof(locala))<0) { L<(ntohs(locala.sin_port))+": "<locals; - stringtok(locals,arg()["local-ipv6"]," ,"); + stringtok(locals,::arg()["local-ipv6"]," ,"); if(locals.empty()) return; @@ -148,7 +148,7 @@ void UDPNameserver::bindIPv6() L<