node: Fixing "bugs": default interest timeout not infitine; ndnid fetcher was doing hash calculation over the wrong data set
Change-Id: I3f05fd927b8e766f043de6178e3157955a8613b9
diff --git a/src/node.cpp b/src/node.cpp
index 8a06b55..3276e62 100644
--- a/src/node.cpp
+++ b/src/node.cpp
@@ -247,7 +247,10 @@
timeoutTimeMilliseconds_ = ndn_getNowMilliseconds() + interest_->getInterestLifetime();
else
// No timeout.
- timeoutTimeMilliseconds_ = -1;
+ /**
+ * @todo Set more meaningful default timeout. This timeout MUST exist.
+ */
+ timeoutTimeMilliseconds_ = ndn_getNowMilliseconds() + 4000;
}
void
diff --git a/src/util/ndnd-id-fetcher.hpp b/src/util/ndnd-id-fetcher.hpp
index c78a385..4f5758d 100644
--- a/src/util/ndnd-id-fetcher.hpp
+++ b/src/util/ndnd-id-fetcher.hpp
@@ -58,7 +58,7 @@
if (ndndIdData->getSignature().getType() == Signature::Sha256WithRsa)
{
ndndId_.resize(32);
- ndn_digestSha256(ndndIdData->getSignature().getValue().value(), ndndIdData->getSignature().getValue().value_size(), ndndId_.buf());
+ ndn_digestSha256(ndndIdData->getContent().value(), ndndIdData->getContent().value_size(), ndndId_.buf());
onSuccess_();
}
else