Internal: Use C struct ndn_Blob where possible. Make ndn::Blob work with ndn_Blob.
diff --git a/ndn-cpp/forwarding-entry.cpp b/ndn-cpp/forwarding-entry.cpp
index 57c01c4..93c4d26 100644
--- a/ndn-cpp/forwarding-entry.cpp
+++ b/ndn-cpp/forwarding-entry.cpp
@@ -15,8 +15,8 @@
void
ForwardingEntry::set(const struct ndn_ForwardingEntry& forwardingEntryStruct)
{
- if (forwardingEntryStruct.action && forwardingEntryStruct.actionLength > 0)
- action_ = string(forwardingEntryStruct.action, forwardingEntryStruct.action + forwardingEntryStruct.actionLength);
+ if (forwardingEntryStruct.action.value && forwardingEntryStruct.action.length > 0)
+ action_ = string(forwardingEntryStruct.action.value, forwardingEntryStruct.action.value + forwardingEntryStruct.action.length);
else
action_ = "";
@@ -36,11 +36,11 @@
forwardingEntryStruct.forwardingFlags = forwardingFlags_;
forwardingEntryStruct.freshnessSeconds = freshnessSeconds_;
- forwardingEntryStruct.actionLength = action_.size();
+ forwardingEntryStruct.action.length = action_.size();
if (action_.size() > 0)
- forwardingEntryStruct.action = (uint8_t *)&action_[0];
+ forwardingEntryStruct.action.value = (uint8_t *)&action_[0];
else
- forwardingEntryStruct.action = 0;
+ forwardingEntryStruct.action.value = 0;
}
}