fw: move STRATEGY_NAME to getStrategyName static function
This avoids potential problems with static initialization order.
refs #3868
Change-Id: I13f0ff6c51c0a3bd43af7993233ff63a4bca9cf9
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 45235d8..df92d1b 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -31,8 +31,6 @@
namespace fw {
NFD_LOG_INIT("AccessStrategy");
-
-const Name AccessStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/access/%FD%01");
NFD_REGISTER_STRATEGY(AccessStrategy);
AccessStrategy::AccessStrategy(Forwarder& forwarder, const Name& name)
@@ -42,6 +40,13 @@
{
}
+const Name&
+AccessStrategy::getStrategyName()
+{
+ static Name strategyName("/localhost/nfd/strategy/access/%FD%01");
+ return strategyName;
+}
+
void
AccessStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
const shared_ptr<pit::Entry>& pitEntry)