]> granicus.if.org Git - pdns/commitdiff
lmdbbackend: fix types pointing at root
authorKees Monshouwer <mind04@monshouwer.org>
Wed, 10 Dec 2014 20:50:46 +0000 (21:50 +0100)
committermind04 <mind04@monshouwer.org>
Mon, 22 Dec 2014 19:36:08 +0000 (20:36 +0100)
modules/lmdbbackend/lmdbbackend.cc
regression-tests/tests/ds-at-both-sides/skip.lmdb [new file with mode: 0644]

index 92a21884010e042d1796769d86111dd051f0970b..a1b12508fbf7e5705dcbe183c8625b1937b679c9 100644 (file)
@@ -443,7 +443,7 @@ next_record:
     string cur_value((const char *)value.mv_data, value.mv_size);
     string cur_key((const char *)key.mv_data, key.mv_size);
 
-    DEBUGLOG("querykey: " << d_querykey << "; cur_key: " <<cur_key<< "; cur_value: " << cur_value << endl);
+    DEBUGLOG("querykey: " << d_querykey << "; cur_key: " <<cur_key<< "; cur_value: '" << cur_value << "'" << endl);
 
     vector<string> keyparts, valparts;
 
@@ -466,8 +466,11 @@ next_record:
         stringtok(valparts, cur_value, "\t");
     }
 
+    if (valparts.size() != 3) // FIXME
+      valparts.push_back(".");
+
     if( keyparts.size() != 2 || valparts.size() != 3 )
-        throw PDNSException("Invalid record in record table: key: '" + cur_key + "'; value: "+ cur_value);
+        throw PDNSException("Invalid record in record table: key: '" + cur_key + "'; value: '"+ cur_value+"'");
 
     string compare_string = cur_key.substr(0, d_searchkey.length());
     DEBUGLOG( "searchkey: " << d_searchkey << "; compare: " << compare_string << ";" << endl);
diff --git a/regression-tests/tests/ds-at-both-sides/skip.lmdb b/regression-tests/tests/ds-at-both-sides/skip.lmdb
new file mode 100644 (file)
index 0000000..e69de29