src: Recreating face in case of face deletion by NFD

Change-Id: Idd1d0b7f521e574ace38d6f671a682622d98209d
diff --git a/src/adjacency-list.cpp b/src/adjacency-list.cpp
index a905a7d..9d026af 100644
--- a/src/adjacency-list.cpp
+++ b/src/adjacency-list.cpp
@@ -233,6 +233,34 @@
   return it;
 }
 
+Adjacent *
+AdjacencyList::findAdjacent(const ndn::Name& adjName)
+{
+  std::list<Adjacent>::iterator it = std::find_if(m_adjList.begin(),
+                                                  m_adjList.end(),
+                                                  ndn::bind(&Adjacent::compare,
+                                                            _1, ndn::cref(adjName)));
+  if (it != m_adjList.end()) {
+    return &(*it);
+  }
+
+  return 0;
+}
+
+Adjacent *
+AdjacencyList::findAdjacent(uint64_t faceId)
+{
+  std::list<Adjacent>::iterator it = std::find_if(m_adjList.begin(),
+                                                  m_adjList.end(),
+                                                  ndn::bind(&Adjacent::compareFaceId,
+                                                            _1, faceId));
+  if (it != m_adjList.end()) {
+    return &(*it);
+  }
+
+  return 0;
+}
+
 void
 AdjacencyList::writeLog()
 {