@@ -46,7 +46,7 @@ RRsetCache::lookup(const isc::dns::Name& qname,
keydata.first, keydata.second, RRClass(class_)));
//If the rrset entry has expired, return NULL.
- if(time(NULL) > entry_ptr->getExpireTime()) {
+ if(entry_ptr && (time(NULL) > entry_ptr->getExpireTime())) {
return RRsetEntryPtr();
}
return entry_ptr;
@@ -79,8 +79,9 @@ private:
uint16_t class_; // The class of the rrset cache.
isc::nsas::HashTable<RRsetEntry> rrset_table_;
isc::nsas::LruList<RRsetEntry> rrset_lru_;
-
};
+
+typedef boost::shared_ptr<RRsetCache> RRsetCachePtr;
} // namespace cache
} // namespace isc
@@ -33,6 +33,7 @@ RRsetEntry::RRsetEntry(const isc::dns::RRset& rrset, const RRsetTrustLevel& leve
rdata_itor->first();
while(!rdata_itor->isLast()){
rrset_->addRdata(rdata_itor->getCurrent());
+ rdata_itor->next();