Make MetaInfo.finalBlockID a Name::Component.
diff --git a/ndn-cpp/data.cpp b/ndn-cpp/data.cpp
index 629ff37..0c5e7f3 100644
--- a/ndn-cpp/data.cpp
+++ b/ndn-cpp/data.cpp
@@ -49,9 +49,9 @@
metaInfoStruct.type = type_;
metaInfoStruct.freshnessSeconds = freshnessSeconds_;
- metaInfoStruct.finalBlockIDLength = finalBlockID_.size();
- if (finalBlockID_.size() > 0)
- metaInfoStruct.finalBlockID = (unsigned char *)&finalBlockID_[0];
+ metaInfoStruct.finalBlockIDLength = finalBlockID_.getValue().size();
+ if (metaInfoStruct.finalBlockIDLength > 0)
+ metaInfoStruct.finalBlockID = (unsigned char *)finalBlockID_.getValue().buf();
else
metaInfoStruct.finalBlockID = 0;
}
@@ -61,7 +61,7 @@
timestampMilliseconds_ = metaInfoStruct.timestampMilliseconds;
type_ = metaInfoStruct.type;
freshnessSeconds_ = metaInfoStruct.freshnessSeconds;
- setVector(finalBlockID_, metaInfoStruct.finalBlockID, metaInfoStruct.finalBlockIDLength);
+ finalBlockID_.setValue(Blob(metaInfoStruct.finalBlockID, metaInfoStruct.finalBlockIDLength));
}
void Data::get(struct ndn_Data& dataStruct) const