dispatcher
Change-Id: I5ff25afcba3f03249ae32cf9c656f69ecc38d424
diff --git a/src/sync-core.cpp b/src/sync-core.cpp
index f894746..23c65c3 100644
--- a/src/sync-core.cpp
+++ b/src/sync-core.cpp
@@ -38,7 +38,7 @@
SyncCore::SyncCore(Face& face, SyncLogPtr syncLog, const Name& userName, const Name& localPrefix,
const Name& syncPrefix, const StateMsgCallback& callback,
- long syncInterestInterval /*= -1.0*/)
+ time::seconds syncInterestInterval /*= -1.0*/)
: m_face(face)
, m_log(syncLog)
, m_scheduler(m_face.getIoService())
@@ -60,8 +60,9 @@
m_log->UpdateLocalLocator(localPrefix);
- time::seconds interval = time::seconds(
- (m_syncInterestInterval > 0 && m_syncInterestInterval < 30) ? m_syncInterestInterval : 4);
+ time::seconds interval =
+ (m_syncInterestInterval > time::seconds(0) && m_syncInterestInterval < time::seconds(30)) ?
+ m_syncInterestInterval : time::seconds(4);
m_periodicInterestEvent =
m_scheduler.scheduleEvent(interval, bind(&SyncCore::sendPeriodicSyncInterest, this, interval));
@@ -156,8 +157,8 @@
<< syncInterest);
Interest interest(syncInterest);
- if (m_syncInterestInterval > 0 && m_syncInterestInterval < 30) {
- interest.setInterestLifetime(time::seconds(m_syncInterestInterval));
+ if (m_syncInterestInterval > time::seconds(0) && m_syncInterestInterval < time::seconds(30)) {
+ interest.setInterestLifetime(m_syncInterestInterval);
}
m_face.expressInterest(interest, bind(&SyncCore::handleSyncData, this, _1, _2),