src: fix prefix advertise runtime error
Don't schedule Hello after receiving face changes in dataset,
let it be on its schedule. Also don't schedule routing calc (HR)
or AdjLsa (LS) let them be scheduled on Hello Data.
refs: #4215
Change-Id: I5c3881943f83b2f7683316fa3e22e6c280b6b64d
diff --git a/src/adjacency-list.hpp b/src/adjacency-list.hpp
index daceae1..dcb1539 100644
--- a/src/adjacency-list.hpp
+++ b/src/adjacency-list.hpp
@@ -1,4 +1,4 @@
- /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
* Copyright (c) 2014-2017, The University of Memphis,
* Regents of the University of California,
@@ -22,12 +22,12 @@
#ifndef NLSR_ADJACENCY_LIST_HPP
#define NLSR_ADJACENCY_LIST_HPP
+#include "adjacent.hpp"
+
#include <list>
#include <boost/cstdint.hpp>
#include <ndn-cxx/common.hpp>
-#include "adjacent.hpp"
-
namespace nlsr {
class AdjacencyList
@@ -148,6 +148,19 @@
AdjacencyList::iterator
findAdjacent(const ndn::util::FaceUri& faceUri);
+ /*! \brief Hack to stop developers from using this function
+
+ It is here so that faceUri cannot be passed in as string,
+ converted to Name and findAdjacent(Name) be used.
+ So when faceUri is passed as string this will cause a compile error
+ */
+ template <typename T = float> void
+ findAdjacent(const std::string& faceUri)
+ {
+ BOOST_STATIC_ASSERT_MSG(std::is_integral<T>::value,
+ "Don't use std::string with findAdjacent!");
+ }
+
uint64_t
getFaceId(const ndn::util::FaceUri& faceUri);