Changeset 1270
- Timestamp:
- 11/15/08 20:34:19 (5 years ago)
- Location:
- trunk/pdns/pdns
- Files:
-
- 2 modified
-
dnspacket.cc (modified) (2 diffs)
-
nameserver.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/pdns/dnspacket.cc
r1252 r1270 189 189 // 10800 3600 604800 3600 190 190 data.serial=0; 191 data.refresh= arg().asNum("soa-refresh-default");192 data.retry= arg().asNum("soa-retry-default");193 data.expire= arg().asNum("soa-expire-default");194 data.default_ttl= arg().asNum("soa-minimum-ttl");191 data.refresh=::arg().asNum("soa-refresh-default"); 192 data.retry=::arg().asNum("soa-retry-default"); 193 data.expire=::arg().asNum("soa-expire-default"); 194 data.default_ttl=::arg().asNum("soa-minimum-ttl"); 195 195 196 196 vector<string>parts; … … 297 297 stable_sort(rrs.begin(),rrs.end(),rrcomp); 298 298 299 static bool mustShuffle = arg().mustDo("no-shuffle");299 static bool mustShuffle =::arg().mustDo("no-shuffle"); 300 300 301 301 if(!d_tcp && !mustShuffle) { -
trunk/pdns/pdns/nameserver.cc
r1245 r1270 80 80 { 81 81 vector<string>locals; 82 stringtok(locals, arg()["local-address"]," ,");82 stringtok(locals,::arg()["local-address"]," ,"); 83 83 84 84 if(locals.empty()) … … 115 115 } 116 116 117 locala.sin_port=htons( arg().asNum("local-port"));117 locala.sin_port=htons(::arg().asNum("local-port")); 118 118 119 if( bind(s, (sockaddr*)&locala,sizeof(locala))<0) {119 if(::bind(s, (sockaddr*)&locala,sizeof(locala))<0) { 120 120 L<<Logger::Error<<"binding UDP socket to '"+localname+"' port "+lexical_cast<string>(ntohs(locala.sin_port))+": "<<strerror(errno)<<endl; 121 121 throw AhuException("Unable to bind to UDP socket"); … … 123 123 d_highfd=max(s,d_highfd); 124 124 d_sockets.push_back(s); 125 L<<Logger::Error<<"UDP server bound to "<<inet_ntoa(locala.sin_addr)<<":"<< arg().asNum("local-port")<<endl;125 L<<Logger::Error<<"UDP server bound to "<<inet_ntoa(locala.sin_addr)<<":"<<::arg().asNum("local-port")<<endl; 126 126 FD_SET(s, &d_rfds); 127 127 } … … 132 132 #if !WIN32 && HAVE_IPV6 133 133 vector<string>locals; 134 stringtok(locals, arg()["local-ipv6"]," ,");134 stringtok(locals,::arg()["local-ipv6"]," ,"); 135 135 136 136 if(locals.empty()) … … 149 149 } 150 150 151 ComboAddress locala(localname, arg().asNum("local-port"));151 ComboAddress locala(localname, ::arg().asNum("local-port")); 152 152 153 153 if(bind(s, (sockaddr*)&locala, sizeof(locala))<0) { … … 157 157 d_highfd=max(s,d_highfd); 158 158 d_sockets.push_back(s); 159 L<<Logger::Error<<"UDPv6 server bound to ["<<localname<<"]:"<< arg().asNum("local-port")<<endl;159 L<<Logger::Error<<"UDPv6 server bound to ["<<localname<<"]:"<<::arg().asNum("local-port")<<endl; 160 160 FD_SET(s, &d_rfds); 161 161 } … … 167 167 d_highfd=0; 168 168 FD_ZERO(&d_rfds); 169 if(! arg()["local-address"].empty())169 if(!::arg()["local-address"].empty()) 170 170 bindIPv4(); 171 if(! arg()["local-ipv6"].empty())171 if(!::arg()["local-ipv6"].empty()) 172 172 bindIPv6(); 173 173 174 if( arg()["local-address"].empty() &&arg()["local-ipv6"].empty())174 if(::arg()["local-address"].empty() && ::arg()["local-ipv6"].empty()) 175 175 L<<Logger::Critical<<"PDNS is deaf and mute! Not listening on any interfaces"<<endl; 176 176