Allow override of the session number (required by NLSR)
Change-Id: Ifb08868d6a640518aa826d3bec4546dc4e001dfa
diff --git a/src/socket.cpp b/src/socket.cpp
index a4c1673..4468fb7 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -39,12 +39,14 @@
const UpdateCallback& updateCallback,
const Name& signingId,
std::shared_ptr<Validator> validator,
- const time::milliseconds& syncInterestLifetime)
+ const time::milliseconds& syncInterestLifetime,
+ const name::Component& session)
: m_userPrefix(userPrefix)
, m_face(face)
, m_logic(face, syncPrefix, userPrefix, updateCallback, Logic::DEFAULT_NAME, Logic::DEFAULT_VALIDATOR,
Logic::DEFAULT_RESET_TIMER, Logic::DEFAULT_CANCEL_RESET_TIMER, Logic::DEFAULT_RESET_INTEREST_LIFETIME,
- syncInterestLifetime)
+ syncInterestLifetime, Logic::DEFAULT_SYNC_REPLY_FRESHNESS, Logic::DEFAULT_RECOVERY_INTEREST_LIFETIME,
+ session)
, m_signingId(signingId)
, m_validator(validator)
{
@@ -67,7 +69,7 @@
}
void
-Socket::addSyncNode(const Name& prefix, const Name& signingId)
+Socket::addSyncNode(const Name& prefix, const Name& signingId, const name::Component& session)
{
if (prefix == DEFAULT_NAME)
return;
@@ -80,7 +82,7 @@
if (m_userPrefix == DEFAULT_NAME)
m_userPrefix = prefix;
- m_logic.addUserNode(prefix, signingId);
+ m_logic.addUserNode(prefix, signingId, session);
m_registeredPrefixList[prefix] =
m_face.setInterestFilter(prefix,
bind(&Socket::onInterest, this, _1, _2),
@@ -103,7 +105,6 @@
m_ims.erase(prefix);
m_logic.removeUserNode(prefix);
-
}
void