<div dir="ltr"><div><div>Hi,<br><br>@<span name="Spyridon (Spyros) Mastorakis" class="gmail-gD">Spyridon (Spyros) Mastorakis, I did not know the actual problem at that time that's why I was unable to mention it. The answer of the @Junxiao Shi solved that  specific error for me. Thanks to both of you for response and help. I want</span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span><span name="Spyridon (Spyros) Mastorakis" class="gmail-gD"></span> to know should I still be creating new nonce for interest?<br><br>I'm getting another problem which I think is related to previous one, let me explain it below:<br><br></div><span style="font-family:tahoma,sans-serif">shared_ptr<lp::NextHopFaceIdTag> nextHopTag = interest.getTag<lp::NextHopFaceIdTag>();</span><br><br></div>Above line in <span style="font-family:tahoma,sans-serif">onContentStoreMiss</span> method in <span style="font-family:tahoma,sans-serif">Forwarder.cpp</span> always returns <i><span style="font-family:tahoma,sans-serif">nullptr</span></i> making <span style="font-family:tahoma,sans-serif">if (nextHopTag != nullptr) returns false</span> at very next line. So the execution does not goes inside this if-block. This way, following statement inside the if-block <br><br><span style="font-family:tahoma,sans-serif">this->onOutgoingInterest(pitEntry, *nextHopFace, interest); </span><br><br>never executed and hence the Interest is not flooded to neighboring nodes. Why the <span style="font-family:tahoma,sans-serif">nextHopTag</span> is <span style="font-family:tahoma,sans-serif">null</span> in Interest? What is the solution of it? Am I missing something? Please help.<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 April 2018 at 05:35, Junxiao Shi <span dir="ltr"><<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Mudasir<br><div class="gmail_extra"><br><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br></div><b>Method #2:</b> Creating Interest from an existing Interest like this:<br><div style="margin-left:40px"><span style="font-family:tahoma,sans-serif">const Name& tempName = "---";<br>Interest tempInterest = Interest(interest.wireEncode()<wbr>);<br>tempInterest.setName(tempName)<wbr>;<br></span></div><br></div><b>My problem:</b><br><div><div>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"><b>findOrInsert</b></span> method in <span style="font-family:arial,helvetica,sans-serif"><b>pit.cpp</b></span> file and I don't understand its reason.<br><div style="margin-left:40px"><span style="font-family:tahoma,sans-serif">auto entry = make_shared<Entry>(interest);</span><br></div></div></div></div></blockquote></span><div><br><a href="https://github.com/named-data/ndn-cxx/blob/ebfe4a207f658a77b5249cda4bd0bc35ede82066/src/interest.hpp#L64-L65" target="_blank">https://github.com/named-data/<wbr>ndn-cxx/blob/<wbr>ebfe4a207f658a77b5249cda4bd0bc<wbr>35ede82066/src/interest.hpp#<wbr>L64-L65</a><br><div style="margin-left:40px">In certain contexts that use Interest::shared_from_this(), Interest must be created using `make_shared`. Otherwise, .shared_from_this() will trigger undefined behavior. <br></div><br></div><div>PIT is one of those contexts. So are many other places in NFD.<br></div><div>Thus, you need:<br><span style="font-family:monospace,monospace">auto tempInterest = std::make_shared<Interest>(<wbr>interest.wireEncode());<br>tempInterest->setName(<wbr>tempName);</span><br><br></div><div>Yours, Junxiao<br></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><span style="font-family:georgia,serif">Regards,<br></span></div><div><span style="font-family:georgia,serif">Mudasir Qazi<br></span></div></div></div></div></div></div></div></div></div>
</div>