interest: Cache Link object after the first call to getLink
Change-Id: I2625cdb665365cb3c1a69ec7d917d09ad621988d
Refs: #3158
diff --git a/src/link.cpp b/src/link.cpp
index d4de993..587f480 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -161,11 +161,11 @@
preference = static_cast<uint32_t>(readNonNegativeInteger(*val));
}
catch (tlv::Error&) {
- BOOST_THROW_EXCEPTION(Error("Missing preference field in Link Encoding"));
+ BOOST_THROW_EXCEPTION(Error("Missing Preference field in Link Encoding"));
}
++val;
if (val == delegation.elements_end()) {
- BOOST_THROW_EXCEPTION(Error("Missing name field in Link Encoding"));
+ BOOST_THROW_EXCEPTION(Error("Missing Name field in Link Encoding"));
}
Name name(*val);
m_delegations.insert({preference, name});