model-wire: Fixing compliance with CCNb format regarding Content tag
Previously, content didn't contain a proper BLOB tag
Refs #1020 (http://redmine.named-data.net/issues/1020)
diff --git a/model/wire/ccnb/ccnb-parser/syntax-tree/block.cc b/model/wire/ccnb/ccnb-parser/syntax-tree/block.cc
index 67882a9..ac0d285 100644
--- a/model/wire/ccnb/ccnb-parser/syntax-tree/block.cc
+++ b/model/wire/ccnb/ccnb-parser/syntax-tree/block.cc
@@ -46,7 +46,7 @@
// int Block::counter = 0;
-Ptr<Block> Block::ParseBlock (Buffer::Iterator &start)
+Ptr<Block> Block::ParseBlock (Buffer::Iterator &start, bool dontParseBlock)
{
// std::cout << "<< pos: " << counter << "\n";
uint32_t value = 0;
@@ -62,6 +62,11 @@
}
if (start.IsEnd())
CcnbDecodingException ();
+
+ if (dontParseBlock)
+ {
+ return 0;
+ }
value <<= 4;
value += ( (byte&(~CCN_TT_HBIT)) >> 3);