Browse Source

make it compile

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/f2f200910@247 e5f2f494-b856-4b98-b285-d166d9295462
JINMEI Tatuya 15 years ago
parent
commit
e258d1b633
1 changed files with 7 additions and 9 deletions
  1. 7 9
      src/bin/host/host.cc

+ 7 - 9
src/bin/host/host.cc

@@ -94,16 +94,14 @@ host_lookup(char* name, std::string type)
                       if ((*it)->getType() != RRType::A) {
                           continue;
                       }
-                      vector<Rdata::IN::A> addresses;
-//                      (*it)->getRdatalist<Rdata::IN::A>(addresses);
-//                      for (vector<Rdata::IN::A>::const_iterator ait =
-//
-//                          addresses.begin(); ait != addresses.end(); ++ait) {
-//
-//                          ait->getAddress();  //this should return in_addr&
-//                      }
+                      std::vector<Rdata::RdataPtr>::const_iterator ait;
+                      for (ait = (*it)->getRdatalist().begin();
+                           ait != (*it)->getRdatalist().end();
+                           ++ait) {
+                          // this should be in_addr of the address
+                          static_cast<const Rdata::IN::A&>(**ait).getAddress();
+                      }
                   }
-
             } else {
                 gettimeofday(&after_time, NULL);