[Pdns-dev]
Dean Anderson
dean at av8.com
Tue Nov 11 19:47:52 CET 2003
Nevermind, brain fart. It is an _iterator_ to a map. 'first' is the key,
'second' is the value... Sigh. Time to go home and sleep...
--Dean
On Tue, 11 Nov 2003, Dean Anderson wrote:
> In the file dnsproxy.cc there is the following method:
>
> The iterator i points to a structure of type ConnTrack, defined in
> dnsproxy.hh. The funny thing is that ConnTrack does not have a member
> called 'second'. It does have a member called 'created'. So, can someone
> explain what second in the method below refers to? And where is it
> defined?
>
> Thanks,
>
> --Dean
>
> int DNSProxy::getID_locked()
> {
> map_t::iterator i;
> for(int n=0;;++n) {
> i=d_conntrack.find(n);
> if(i==d_conntrack.end()) {
> return n;
> }
> else if(i->second.created<time(0)-60) {
> if(i->second.created)
> L<<Logger::Warning<<"Recursive query for remote "<<
> sockAddrToString((struct sockaddr_in *)&i->second.remote,
> i->second.addrlen)<<" with internal id "<<n<<
> " was not answered by backend within timeout, reusing id"<<endl;
>
> return n;
> }
> }
> }
>
>
>
> _______________________________________________
> Pdns-dev mailing list
> Pdns-dev at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-dev
>
More information about the Pdns-dev
mailing list