Face: Make pendingInterestId and registeredPrefixId uint64_t.
diff --git a/ndn-cpp/node.cpp b/ndn-cpp/node.cpp
index a86bdff..b0df607 100644
--- a/ndn-cpp/node.cpp
+++ b/ndn-cpp/node.cpp
@@ -65,8 +65,8 @@
0x30, 0x18, 0xeb, 0x90, 0xfb, 0x17, 0xd3, 0xce, 0xb5
};
-unsigned int Node::PendingInterest::lastPendingInterestId_ = 0;
-unsigned int Node::RegisteredPrefix::lastRegisteredPrefixId_ = 0;
+uint64_t Node::PendingInterest::lastPendingInterestId_ = 0;
+uint64_t Node::RegisteredPrefix::lastRegisteredPrefixId_ = 0;
/**
* Set the KeyLocator using the full SELFREG_PUBLIC_KEY_DER, sign the data packet using SELFREG_PRIVATE_KEY_DER
@@ -123,14 +123,14 @@
{
}
-unsigned int
+uint64_t
Node::expressInterest(const Interest& interest, const OnData& onData, const OnTimeout& onTimeout)
{
// TODO: Properly check if we are already connected to the expected host.
if (!transport_->getIsConnected())
transport_->connect(*connectionInfo_, *this);
- unsigned int pendingInterestId = PendingInterest::getNextPendingInterestId();
+ uint64_t pendingInterestId = PendingInterest::getNextPendingInterestId();
pendingInterestTable_.push_back(shared_ptr<PendingInterest>(new PendingInterest
(pendingInterestId, shared_ptr<const Interest>(new Interest(interest)), onData, onTimeout)));
@@ -141,7 +141,7 @@
}
void
-Node::removePendingInterest(unsigned int pendingInterestId)
+Node::removePendingInterest(uint64_t pendingInterestId)
{
// Go backwards through the list so we can erase entries.
// Remove all entries even though pendingInterestId should be unique.
@@ -151,12 +151,12 @@
}
}
-unsigned int
+uint64_t
Node::registerPrefix
(const Name& prefix, const OnInterest& onInterest, const OnRegisterFailed& onRegisterFailed, const ForwardingFlags& flags, WireFormat& wireFormat)
{
// Get the registeredPrefixId now so we can return it to the caller.
- unsigned int registeredPrefixId = RegisteredPrefix::getNextRegisteredPrefixId();
+ uint64_t registeredPrefixId = RegisteredPrefix::getNextRegisteredPrefixId();
if (ndndId_.size() == 0) {
// First fetch the ndndId of the connected hub.
@@ -173,7 +173,7 @@
}
void
-Node::removeRegisteredPrefix(unsigned int registeredPrefixId)
+Node::removeRegisteredPrefix(uint64_t registeredPrefixId)
{
// Go backwards through the list so we can erase entries.
// Remove all entries even though pendingInterestId should be unique.
@@ -206,7 +206,7 @@
void
Node::registerPrefixHelper
- (unsigned int registeredPrefixId, const shared_ptr<const Name>& prefix, const OnInterest& onInterest, const OnRegisterFailed& onRegisterFailed,
+ (uint64_t registeredPrefixId, const shared_ptr<const Name>& prefix, const OnInterest& onInterest, const OnRegisterFailed& onRegisterFailed,
const ForwardingFlags& flags, WireFormat& wireFormat)
{
// Create a ForwardingEntry.
@@ -337,7 +337,7 @@
}
Node::PendingInterest::PendingInterest
- (unsigned int pendingInterestId, const shared_ptr<const Interest>& interest, const OnData& onData, const OnTimeout& onTimeout)
+ (uint64_t pendingInterestId, const shared_ptr<const Interest>& interest, const OnData& onData, const OnTimeout& onTimeout)
: pendingInterestId_(pendingInterestId), interest_(interest), onData_(onData), onTimeout_(onTimeout)
{
// Set up timeoutTime_.