void NameServer::resolv_next(const Name& n)
{
#ifdef DEBUG_RESOLV
- std::cerr<< "resolv_next -> tratando de resolver: " << n << "\n";
+ std::cerr << "resolv_next -> tratando de resolver: " << n << "\n";
#endif
search_zone zs(n);
bool found;
{
// TODO mandar resultados?
#ifdef DEBUG_RESOLV
- std::cerr<< "resolv_next found (local/hijo): " << zs.crecord << "\n";
+ std::cerr << "resolv_next found (local/hijo): " << zs.crecord << "\n";
#endif
return;
}
{
// TODO mandar NOT FOUND
#ifdef DEBUG_RESOLV
- std::cerr<< "resolv_next NOT FOUND (es local pero no existe)\n";
+ std::cerr << "resolv_next NOT FOUND (es local pero no existe)\n";
#endif
return;
}
cache_t::const_iterator i = cache.find(n);
+ // TODO TTL!?!
if (i != cache.end())
{
// TODO mandar resultados?
#ifdef DEBUG_RESOLV
- std::cerr<< "resolv_next found (en cache): " << i->second << "\n";
+ std::cerr << "resolv_next found (en cache): " << i->second << "\n";
#endif
return;
}
}
// TODO enviar NOT FOUND
#ifdef DEBUG_RESOLV
- std::cerr<< "resolv_next NOT FOUND (no hay padre)\n";
+ std::cerr << "resolv_next NOT FOUND (no hay padre)\n";
#endif
}