src: Minor corrections and improvements
Change-Id: If1041d13b7c469e64e3523297438067baf96b1d6
diff --git a/tools/ndncatchunks3.cpp b/tools/ndncatchunks3.cpp
index 2b0e635..d84758a 100644
--- a/tools/ndncatchunks3.cpp
+++ b/tools/ndncatchunks3.cpp
@@ -53,7 +53,7 @@
private:
void
- onData(const Interest& interest, Data& data);
+ onData(Data& data);
void
onTimeout(const Interest& interest);
@@ -84,7 +84,7 @@
interest.setMustBeFresh(m_mustBeFresh);
m_face.expressInterest(interest,
- bind(&Consumer::onData, this, _1, _2),
+ bind(&Consumer::onData, this, _2),
bind(&Consumer::onTimeout, this, _1));
}
@@ -98,7 +98,7 @@
}
void
-Consumer::onData(const Interest& interest, Data& data)
+Consumer::onData(Data& data)
{
const Block& content = data.getContent();
const Name& name = data.getName();
@@ -125,7 +125,7 @@
interest.setMustBeFresh(m_mustBeFresh);
m_face.expressInterest(interest,
- bind(&Consumer::onData, this, _1, _2),
+ bind(&Consumer::onData, this, _2),
bind(&Consumer::onTimeout, this, _1));
}
}
diff --git a/tools/ndnputchunks3.cpp b/tools/ndnputchunks3.cpp
index 532b952..ca9475a 100644
--- a/tools/ndnputchunks3.cpp
+++ b/tools/ndnputchunks3.cpp
@@ -62,7 +62,7 @@
}
void
- onInterest(const Name& name, const Interest& interest)
+ onInterest(const Interest& interest)
{
if (m_isVerbose)
std::cerr << "<< I: " << interest << std::endl;
@@ -78,7 +78,9 @@
void
onRegisterFailed(const Name& prefix, const std::string& reason)
{
- std::cerr << "ERROR: Failed to register prefix in local hub's daemon (" << reason << ")" << std::endl;
+ std::cerr << "ERROR: Failed to register prefix '"
+ << prefix << "' in local hub's daemon (" << reason << ")"
+ << std::endl;
m_face.shutdown();
}
@@ -92,7 +94,7 @@
}
m_face.setInterestFilter(m_name,
- bind(&Producer::onInterest, this, _1, _2),
+ bind(&Producer::onInterest, this, _2),
RegisterPrefixSuccessCallback(),
bind(&Producer::onRegisterFailed, this, _1, _2));
m_face.processEvents();