fixed bpq distructor & max cache size
authoraidan
Wed, 11 Jan 2012 17:25:15 +0000
changeset 75 d647d52028bc
parent 74 a86a8cfe49c8
child 76 aeabfd54d3b6
fixed bpq distructor & max cache size
servlib/bundling/BPQBlock.cc
servlib/bundling/BPQCache.cc
--- a/servlib/bundling/BPQBlock.cc	Tue Jan 10 17:50:20 2012 +0000
+++ b/servlib/bundling/BPQBlock.cc	Wed Jan 11 17:25:15 2012 +0000
@@ -65,14 +65,6 @@
         free(query_val_);
         query_val_ = NULL;
     }
-
-    BPQFragmentList::iterator iter;
-    for (iter  = fragments_.begin();
-    	 iter != fragments_.end();
-    	 ++iter) {
-
-    	delete *iter;
-    }
 }
 
 //----------------------------------------------------------------------
--- a/servlib/bundling/BPQCache.cc	Tue Jan 10 17:50:20 2012 +0000
+++ b/servlib/bundling/BPQCache.cc	Wed Jan 11 17:25:15 2012 +0000
@@ -188,9 +188,9 @@
 bool
 BPQCache::create_cache_entry(Bundle* bundle, BPQBlock* block, std::string key)
 {
-	if (cache_size_ < bundle->payload().length()) {
-		log_warn("bundle too large to add to cache {cache size: %u, bundle size: %u}",
-				cache_size_, bundle->payload().length());
+	if (max_cache_size_ < bundle->payload().length()) {
+		log_warn("bundle too large to add to cache {max cache size: %u, bundle size: %u}",
+				max_cache_size_, bundle->payload().length());
 
 		return false;
 	}
@@ -264,9 +264,9 @@
 {
 	ASSERT( bundle->is_fragment() );
 
-	if (cache_size_ < bundle->payload().length()) {
-		log_warn("bundle too large to add to cache {cache size: %u, bundle size: %u}",
-				cache_size_, bundle->payload().length());
+	if (max_cache_size_ < bundle->payload().length()) {
+		log_warn("bundle too large to add to cache {max cache size: %u, bundle size: %u}",
+				max_cache_size_, bundle->payload().length());
 
 		return false;
 	}