Bug #2322
Updated by Vince Lehman almost 10 years ago
Before a NamePrefixTable entry is removed, the LSDB is checked to make sure that the corresponding LSAs do not exist. if (((*it).getRteListSize() == 0) && (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/name"), std::string("name"))) && (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/adjacency"), std::string("adjacency"))) && (!m_nlsr.getLsdb().doesLsaExist(destRouter.append("/coordinate"), std::string("coordinate")))) { m_table.erase(it); m_nlsr.getFib().remove(name); } But, ndn::Name::append modifies the name that it is called with. So, the second check is actually checking: $destRouter$/name/adjacency Also, appending "/COMPONENT" is not the same as appending "COMPONENT". BOOST_AUTO_TEST_CASE(ComponentTest) { ndn::Name name1("Router"); name1.append("/name"); ndn::Name name2("Router"); name2.append("name"); BOOST_CHECK_EQUAL(name1, name2); } error in "ComponentTest": check name1 == name2 failed [/Router/%2Fname != /Router/name] Thus, these checks will always return true as the names are stored in the LSDB are different from without the names that are checked. '/' character.