Small modification regarding suppression

Now, Interest can be suppressed in both onInterest and onNack.  If there
are still good outgoing faces except incoming, onInterest will suppress.
If after invalidating the incoming face, there are still good faces
left, onNack will suppress.
diff --git a/model/ccnx-l3-protocol.cc b/model/ccnx-l3-protocol.cc
index 5484fb7..37264d5 100644
--- a/model/ccnx-l3-protocol.cc
+++ b/model/ccnx-l3-protocol.cc
@@ -295,17 +295,28 @@
 
   tuple<const CcnxPitEntry&,bool,bool> ret = m_pit->Lookup (*header);
   CcnxPitEntry const& pitEntry = ret.get<0> ();
-  // bool isNew = ret.get<1> ();
-  bool isDuplicated = ret.get<2> ();
+  bool isNew = ret.get<1> ();
+  //bool isDuplicated = ret.get<2> ();
 
-  NS_ASSERT_MSG (isDuplicated,
-                 "NACK should be a duplicated interest");
+  // NS_ASSERT_MSG (isDuplicated,
+  //                "NACK should be a duplicated interest");
+  if (isNew /*|| !isDuplicated*/) // potential flow
+    {
+      // somebody is doing something bad
+      NS_ASSERT (false); // temporary assert
+      return;
+    }
   
   // CcnxPitEntryIncomingFaceContainer::type::iterator inFace = pitEntry.m_incoming.find (incomingFace);
   CcnxPitEntryOutgoingFaceContainer::type::iterator outFace = pitEntry.m_outgoing.find (incomingFace);
 
-  NS_ASSERT_MSG (outFace != pitEntry.m_outgoing.end (),
-                 "Outgoing entry should exist");
+  if (outFace != pitEntry.m_outgoing.end ())
+    {
+      // NS_ASSERT_MSG (outFace != pitEntry.m_outgoing.end (),
+      //                "Outgoing entry should exist");
+      
+      return;
+    }
 
   outFace->m_face->LeakBucketByOnePacket ();
   m_pit->modify (m_pit->iterator_to (pitEntry),
@@ -325,6 +336,14 @@
   m_fib->modify(m_fib->iterator_to (pitEntry.m_fibEntry),
                 ll::bind (&CcnxFibEntry::UpdateStatus,
                           ll::_1, incomingFace, CcnxFibFaceMetric::NDN_FIB_YELLOW));
+
+  if (!pitEntry.AreAllOutgoingInVain ())
+    {
+      // suppress
+      // Don't do anything, we are still expecting data from some other face
+
+      return;
+    }
   
   NS_ASSERT_MSG (m_forwardingStrategy != 0, "Need a forwarding protocol object to process packets");
 
@@ -432,17 +451,16 @@
       m_fib->modify(m_fib->iterator_to (pitEntry.m_fibEntry),
                     ll::bind (&CcnxFibEntry::UpdateStatus,
                               ll::_1, incomingFace, CcnxFibFaceMetric::NDN_FIB_YELLOW));
-
-      // suppress?
     }
-  else if (pitEntry.m_outgoing.size() > 0) // Suppress this interest if we're still expecting data from some other face
 
-    {
+  if (pitEntry.AreTherePromisingOutgoingFacesExcept (incomingFace))
+    { // Suppress this interest if we're still expecting data from some other face
+      
       // We are already expecting data later in future. Suppress the interest
       // m_droppedInterestsTrace (header, NDN_SUPPRESSED_INTEREST, m_node->GetObject<Ccnx> (), incomingFace);
-      return; 
+      return;
     }
-
+  
   /////////////////////////////////////////////////////////////////////
   // Propagate
   /////////////////////////////////////////////////////////////////////
@@ -455,7 +473,8 @@
   // ForwardingStrategy will try its best to forward packet to at least one interface.
   // If no interests was propagated, then there is not other option for forwarding or
   // ForwardingStrategy failed to find it. 
-  if (!propagated) GiveUpInterest (pitEntry, header);
+  if (!propagated && pitEntry.AreAllOutgoingInVain ())
+    GiveUpInterest (pitEntry, header);
 }
 
 void
diff --git a/model/ccnx-pit-entry.cc b/model/ccnx-pit-entry.cc
index 2886ed6..348f01b 100644
--- a/model/ccnx-pit-entry.cc
+++ b/model/ccnx-pit-entry.cc
@@ -107,5 +107,16 @@
   return inVain;
 }
 
+bool
+CcnxPitEntry::AreTherePromisingOutgoingFacesExcept (Ptr<CcnxFace> face) const
+{
+  bool inVain = true;
+  std::for_each (m_outgoing.begin (), m_outgoing.end (),
+                 ll::var(inVain) &=
+                 ((&ll::_1)->*&CcnxPitEntryOutgoingFace::m_face == face ||
+                  (&ll::_1)->*&CcnxPitEntryOutgoingFace::m_waitingInVain));
+
+  return !inVain;
+}
 
 }
diff --git a/model/ccnx-pit-entry.h b/model/ccnx-pit-entry.h
index fd426f5..93e4869 100644
--- a/model/ccnx-pit-entry.h
+++ b/model/ccnx-pit-entry.h
@@ -205,6 +205,13 @@
    */
   bool
   AreAllOutgoingInVain () const;
+
+  /*
+   * @brief Similar to AreAllOutgoingInVain, but ignores `face`
+   * \see AreAllOutgoingInVain
+   **/
+  bool
+  AreTherePromisingOutgoingFacesExcept (Ptr<CcnxFace> face) const;
   
 protected: