<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Have you turned on the corresponding log of your strategy?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
-Muktadir</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> ndnSIM <ndnsim-bounces@lists.cs.ucla.edu> on behalf of Abu Saleh Md Tayeen via ndnSIM <ndnsim@lists.cs.ucla.edu><br>
<b>Sent:</b> Thursday, September 12, 2019 1:00 AM<br>
<b>To:</b> ndnsim@lists.cs.ucla.edu <ndnsim@lists.cs.ucla.edu><br>
<b>Subject:</b> [ndnSIM] beforeExpirePendingInterest not invoked in subclass</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hello everyone,</div>
<div>I am working on a custom strategy where I need to track expired pending interests. I have found that the function
<i>beforeExpirePendingInterest</i> in the base <u>strategy</u> class has been removed in ndnSIM-2.7. I have added the function back in the base
<u>strategy</u> class and modified the <i>onInterestFinalize </i>function in the <u>
forwarder</u> class in the following way.<br>
<i></i></div>
<div><br>
</div>
<div><font size="2"><span style="font-family:arial narrow,sans-serif">if (!pitEntry->isSatisfied) {<br>
    beforeExpirePendingInterest(*pitEntry);<br>
    /*~~~~~~~~~~MY MODIFICATION~~~~~~~~~~~~~*/<br>
    this->dispatchToStrategy(*pitEntry, <br>
      [&] (fw::Strategy& strategy) { strategy.beforeExpirePendingInterest(pitEntry); });</span></font></div>
<div><font size="2"><span style="font-family:arial narrow,sans-serif">}</span></font></div>
<div><br>
</div>
<div>I have recompiled all code in optimized mode and overridden the <i>beforeExpirePendingInterest
</i>in my custom strategy subclass. Now, the problem is, this function is not getting invoked in my strategy subclass when pending interest is expired. What could be the issue? Did I miss anything to add either in the base strategy or forwarder class? All my
 code are inside the scenario folder. Thanks.  <br>
</div>
<div><br>
</div>
<div><br>
<i></i></div>
</div>
</div>
</body>
</html>