face: process face_system.tcp config section in TcpFactory
refs #3904
Change-Id: I509f07e6835a96c7ba05137529f29da76a6514fd
diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index e8a79eb..a2bfc3c 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -93,7 +93,7 @@
return;
}
- ProtocolFactory* factory = m_faceSystem.getProtocolFactory(uri.getScheme());
+ ProtocolFactory* factory = m_faceSystem.getFactoryByScheme(uri.getScheme());
if (factory == nullptr) {
NFD_LOG_TRACE("received create request for unsupported protocol");
done(ControlResponse(406, "Unsupported protocol"));
diff --git a/daemon/mgmt/tables-config-section.cpp b/daemon/mgmt/tables-config-section.cpp
index fcd0916..678b6e5 100644
--- a/daemon/mgmt/tables-config-section.cpp
+++ b/daemon/mgmt/tables-config-section.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -60,16 +60,14 @@
void
TablesConfigSection::processConfig(const ConfigSection& section, bool isDryRun)
{
- typedef boost::optional<const ConfigSection&> OptionalNode;
-
size_t nCsMaxPackets = DEFAULT_CS_MAX_PACKETS;
- OptionalNode csMaxPacketsNode = section.get_child_optional("cs_max_packets");
+ OptionalConfigSection csMaxPacketsNode = section.get_child_optional("cs_max_packets");
if (csMaxPacketsNode) {
nCsMaxPackets = ConfigFile::parseNumber<size_t>(*csMaxPacketsNode, "cs_max_packets", "tables");
}
unique_ptr<cs::Policy> csPolicy;
- OptionalNode csPolicyNode = section.get_child_optional("cs_policy");
+ OptionalConfigSection csPolicyNode = section.get_child_optional("cs_policy");
if (csPolicyNode) {
std::string policyName = csPolicyNode->get_value<std::string>();
csPolicy = cs::Policy::create(policyName);
@@ -80,7 +78,7 @@
}
unique_ptr<fw::UnsolicitedDataPolicy> unsolicitedDataPolicy;
- OptionalNode unsolicitedDataPolicyNode = section.get_child_optional("cs_unsolicited_policy");
+ OptionalConfigSection unsolicitedDataPolicyNode = section.get_child_optional("cs_unsolicited_policy");
if (unsolicitedDataPolicyNode) {
std::string policyName = unsolicitedDataPolicyNode->get_value<std::string>();
unsolicitedDataPolicy = fw::UnsolicitedDataPolicy::create(policyName);
@@ -93,12 +91,12 @@
unsolicitedDataPolicy = make_unique<fw::DefaultUnsolicitedDataPolicy>();
}
- OptionalNode strategyChoiceSection = section.get_child_optional("strategy_choice");
+ OptionalConfigSection strategyChoiceSection = section.get_child_optional("strategy_choice");
if (strategyChoiceSection) {
processStrategyChoiceSection(*strategyChoiceSection, isDryRun);
}
- OptionalNode networkRegionSection = section.get_child_optional("network_region");
+ OptionalConfigSection networkRegionSection = section.get_child_optional("network_region");
if (networkRegionSection) {
processNetworkRegionSection(*networkRegionSection, isDryRun);
}