face: Prevent flags being set for rib/unregister command
Change-Id: I3af8ad83482f0b349937358c1248eb5db1051c10
Refs: #1945
diff --git a/src/detail/face-impl.hpp b/src/detail/face-impl.hpp
index 2d23611..8e48750 100644
--- a/src/detail/face-impl.hpp
+++ b/src/detail/face-impl.hpp
@@ -200,15 +200,16 @@
const SignatureGenerator&,
const time::milliseconds&);
- ControlParameters parameters;
- parameters.setName(prefix);
+ ControlParameters registerParameters, unregisterParameters;
+ registerParameters.setName(prefix);
+ unregisterParameters.setName(prefix);
Registrator registrator, unregistrator;
if (!m_face.m_isDirectNfdFibManagementRequested) {
registrator = static_cast<Registrator>(&Controller::start<RibRegisterCommand>);
unregistrator = static_cast<Registrator>(&Controller::start<RibUnregisterCommand>);
- parameters.setFlags(flags);
+ registerParameters.setFlags(flags);
}
else {
registrator = static_cast<Registrator>(&Controller::start<FibAddNextHopCommand>);
@@ -216,14 +217,14 @@
}
RegisteredPrefix::Unregistrator bindedUnregistrator =
- bind(unregistrator, m_face.m_nfdController, parameters, _1, _2,
+ bind(unregistrator, m_face.m_nfdController, unregisterParameters, _1, _2,
signatureGenerator,
m_face.m_nfdController->getDefaultCommandTimeout());
shared_ptr<RegisteredPrefix> prefixToRegister =
ndn::make_shared<RegisteredPrefix>(prefix, filter, bindedUnregistrator);
- ((*m_face.m_nfdController).*registrator)(parameters,
+ ((*m_face.m_nfdController).*registrator)(registerParameters,
bind(&Impl::afterPrefixRegistered, this,
prefixToRegister, onSuccess),
bind(onFailure, prefixToRegister->getPrefix(), _2),