<div dir="ltr"><br><font face="tahoma, sans-serif"><div style="font-family:tahoma,sans-serif;display:inline" class="gmail_default">​Hi there,<br></div><div style="font-family:tahoma,sans-serif;display:inline" class="gmail_default">Trying to <i>maybe</i> fix issue <a href="https://redmine.named-data.net/issues/3803">#3803</a> I have modified <a href="http://ndnsim.net/2.1/doxygen/classndn_1_1Link.html#a0a49619a5844110df36006c2ae773b11">Link::Link           (          const Block &           block)</a> to:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Link::Link(const Block& block)<br>{<br>  if(m_delegations.empty()){<br>      BOOST_THROW_EXCEPTION(Error("Link object has no delegationName!"));<br>  }<br>  wireDecode(block);<br>}<br></blockquote><div>which works when there is no delegationName set. But the problem is with this snippet:<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">    ndn::Name linkName = m_linkName;<br>    linkName = linkName.appendVersion(m_version);<br>    auto linkObject = make_shared< ::ndn::Link>(linkName);<br>    <span style="background-color:rgb(255,255,0)">linkObject->addDelegation(1,m_delegationName);</span><br>    ndn::Signature sign;<br>    ndn::SignatureInfo signInfo(static_cast< ::ndn::tlv::SignatureTypeValue>(255));<br>    sign.setInfo(signInfo);<br>    sign.setValue(::ndn::nonNegativeIntegerBlock(::ndn::tlv::SignatureValue, 0));<br>    linkObject->setSignature(sign);<br><br>    Ptr<UniformRandomVariable> rand =  CreateObject<UniformRandomVariable>();<br>    interest->setNonce(rand->GetValue(0, std::numeric_limits<uint32_t>::max()));<br>    interest->setInterestLifetime(ndn::time::seconds(2));<br><br>    <span style="background-color:rgb(255,0,0)">interest->setLink(linkObject->wireEncode());</span><br></blockquote><div><br></div><div>having added some delegation in highlighted(yellow) line, again the red line will end up<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">   what():  Link object has no delegationName!<br></blockquote><div><br></div><div>I'm sure the yellow has entered an entry into m_delegation(I have tested it in Link::encodeContent()). <br></div><div>Anyone has an idea how and where m_delegation got empty?<br><br></div><div>Thanks,<br></div><div>Sabet <br></div></div></div><blockquote><div> </div></blockquote></div></font><font face="tahoma, sans-serif"></font></div>