fw: pass parameters to Strategy subclass constructors
refs #3868
Change-Id: I1a09e7353c047d548065c4ed669d1f7993676428
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index cb2bca3..076a3bb 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -39,13 +39,18 @@
const time::milliseconds AsfStrategy::RETX_SUPPRESSION_MAX(250);
AsfStrategy::AsfStrategy(Forwarder& forwarder, const Name& name)
- : Strategy(forwarder, name)
+ : Strategy(forwarder)
, m_measurements(getMeasurements())
, m_probing(m_measurements)
, m_retxSuppression(RETX_SUPPRESSION_INITIAL,
RetxSuppressionExponential::DEFAULT_MULTIPLIER,
RETX_SUPPRESSION_MAX)
{
+ ParsedInstanceName parsed = parseInstanceName(name);
+ if (!parsed.parameters.empty()) {
+ BOOST_THROW_EXCEPTION(std::invalid_argument("AsfStrategy does not accept parameters"));
+ }
+ this->setInstanceName(makeInstanceName(name, getStrategyName()));
}
const Name&