<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Mudasir,<div class=""><br class=""></div><div class="">you are saying that the findOrInsert method gives you an error, but you are not saying what the error is.</div><div class=""><br class=""></div><div class="">Another thing you might have to do with solution #2 is to generate a new nonce for the Interest.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div><div class=""><br class=""></div></div></div></div><div><blockquote type="cite" class=""><div class="">On Apr 3, 2018, at 8:20 AM, Mudasir Qazi <<a href="mailto:mudasirqazi00@gmail.com" class="">mudasirqazi00@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class="">Hi,<br class=""><br class=""></div><b class="">My requirement:</b><br class=""></div>I need to create new Interest from an existing Interest so that all properties will be copied to newly created Interest, than I need to set its name using <span style="font-family:tahoma,sans-serif" class="">setName</span> method. I know following two ways to do this:<br class=""><br class=""></div><b class="">Method #1:</b> Creating empty Interest and setting name like this:<br class=""><div style="margin-left:40px" class=""><span style="font-family:tahoma,sans-serif" class="">const Name& tempName = "---";<br class="">shared_ptr<Interest> tempInterest = make_shared<Interest>();<br class="">tempInterest->setName(tempName);</span><br class=""></div>This method does not copy other properties, but only creates empty Interest and sets its name. And it works fine.<br class=""><br class=""></div><b class="">Method #2:</b> Creating Interest from an existing Interest like this:<br class=""><div style="margin-left:40px" class=""><span style="font-family:tahoma,sans-serif" class="">const Name& tempName = "---";<br class="">Interest tempInterest = Interest(interest.wireEncode());<br class="">tempInterest.setName(tempName);<br class=""></span></div><br class=""></div><b class="">My problem:</b><br class=""><div class=""><div class="">Now, I know Method#2 is the official way that meets my requirements. But the thing is, when I use method#2 it gives error on <span style="font-family:arial,helvetica,sans-serif" class=""><b class="">findOrInsert</b></span> method in <span style="font-family:arial,helvetica,sans-serif" class=""><b class="">pit.cpp</b></span> file and I don't understand its reason.<br class=""><div style="margin-left:40px" class=""><span style="font-family:tahoma,sans-serif" class="">auto entry = make_shared<Entry>(interest);</span><br class=""></div><br class="">Can anybody help me with this? Why I'm getting this error? Which method should I continue with?<br class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class=""><br class="">-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><span style="font-family:georgia,serif" class="">Regards,<br class=""></span></div><div class=""><span style="font-family:georgia,serif" class="">Mudasir Qazi<br class=""></span></div></div></div></div></div></div></div></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div></div></div></blockquote></div><br class=""></div></div></body></html>