src: Minor corrections and improvements
Change-Id: If1041d13b7c469e64e3523297438067baf96b1d6
diff --git a/.waf-tools/pch.py b/.waf-tools/pch.py
index 087d633..1b963ae 100644
--- a/.waf-tools/pch.py
+++ b/.waf-tools/pch.py
@@ -135,10 +135,14 @@
ext_out=['.h']
def runnable_status(self):
+ try:
+ node_deps = self.generator.bld.node_deps[self.uid()]
+ except KeyError:
+ node_deps = []
ret = Task.Task.runnable_status(self)
if ret == Task.SKIP_ME and self.env.CXX_NAME == 'clang':
t = os.stat(self.outputs[0].abspath()).st_mtime
- for n in self.inputs:
+ for n in self.inputs + node_deps:
if os.stat(n.abspath()).st_mtime > t:
return Task.RUN_ME
return ret
diff --git a/examples/producer.cpp b/examples/producer.cpp
index 1a2dbee..2998bd0 100644
--- a/examples/producer.cpp
+++ b/examples/producer.cpp
@@ -67,7 +67,7 @@
void
- onRegisterFailed(const Name& prefix, const std::string& reason)
+ onRegisterFailed(const std::string& reason)
{
std::cerr << "ERROR: Failed to register prefix in local hub's daemon (" << reason << ")"
<< std::endl;
@@ -80,7 +80,7 @@
m_face.setInterestFilter("/localhost/testApp",
bind(&Producer::onInterest, this, _1, _2),
RegisterPrefixSuccessCallback(),
- bind(&Producer::onRegisterFailed, this, _1, _2));
+ bind(&Producer::onRegisterFailed, this, _2));
m_face.processEvents();
}
diff --git a/src/security/certificate-extension.hpp b/src/security/certificate-extension.hpp
index 4267560..cad811f 100644
--- a/src/security/certificate-extension.hpp
+++ b/src/security/certificate-extension.hpp
@@ -94,7 +94,7 @@
return m_extensionId;
}
- inline const bool
+ inline bool
getIsCritical() const
{
return m_isCritical;
diff --git a/src/security/key-chain.hpp b/src/security/key-chain.hpp
index d4b6580..dcf2079 100644
--- a/src/security/key-chain.hpp
+++ b/src/security/key-chain.hpp
@@ -887,7 +887,7 @@
Block sigValue = m_tpm->signInTpm(signedName.wireEncode().value(),
signedName.wireEncode().value_size(),
keyName,
- DIGEST_ALGORITHM_SHA256);
+ digestAlgorithm);
sigValue.encode();
signedName.append(sigValue);
interest.setName(signedName);
diff --git a/src/security/sec-public-info-memory.hpp b/src/security/sec-public-info-memory.hpp
index 1cf2488..faf9c4c 100644
--- a/src/security/sec-public-info-memory.hpp
+++ b/src/security/sec-public-info-memory.hpp
@@ -131,7 +131,7 @@
{
}
- const KeyType
+ KeyType
getKeyType() const
{
return m_keyType;
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index aa3347b..a5a7159 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -185,7 +185,7 @@
* @param keyType
* @returns MAC OS key type
*/
- const CFTypeRef
+ CFTypeRef
getSymKeyType(KeyType keyType);
/**
@@ -194,7 +194,7 @@
* @param keyType
* @returns MAC OS key type
*/
- const CFTypeRef
+ CFTypeRef
getAsymKeyType(KeyType keyType);
/**
@@ -203,7 +203,7 @@
* @param keyClass
* @returns MAC OS key class
*/
- const CFTypeRef
+ CFTypeRef
getKeyClass(KeyClass keyClass);
/**
@@ -212,7 +212,7 @@
* @param digestAlgo
* @returns MAC OS algorithm id
*/
- const CFStringRef
+ CFStringRef
getDigestAlgorithm(DigestAlgorithm digestAlgo);
/**
@@ -1010,7 +1010,7 @@
return keyUri;
}
-const CFTypeRef
+CFTypeRef
SecTpmOsx::Impl::getAsymKeyType(KeyType keyType)
{
switch (keyType){
@@ -1021,7 +1021,7 @@
}
}
-const CFTypeRef
+CFTypeRef
SecTpmOsx::Impl::getSymKeyType(KeyType keyType)
{
switch (keyType){
@@ -1032,7 +1032,7 @@
}
}
-const CFTypeRef
+CFTypeRef
SecTpmOsx::Impl::getKeyClass(KeyClass keyClass)
{
switch (keyClass){
@@ -1047,7 +1047,7 @@
}
}
-const CFStringRef
+CFStringRef
SecTpmOsx::Impl::getDigestAlgorithm(DigestAlgorithm digestAlgo)
{
switch (digestAlgo){
diff --git a/tests/unit-tests/security/test-signed-interest.cpp b/tests/unit-tests/security/test-signed-interest.cpp
index 56b05f9..8d675fc 100644
--- a/tests/unit-tests/security/test-signed-interest.cpp
+++ b/tests/unit-tests/security/test-signed-interest.cpp
@@ -66,11 +66,14 @@
public:
CommandInterestFixture()
: m_validity(false)
- {}
+ {
+ }
void
validated(const shared_ptr<const Interest>& interest)
- { m_validity = true; }
+ {
+ m_validity = true;
+ }
void
validationFailed(const shared_ptr<const Interest>& interest, const string& failureInfo)
@@ -80,7 +83,9 @@
void
reset()
- { m_validity = false; }
+ {
+ m_validity = false;
+ }
bool m_validity;
};
diff --git a/tests/unit-tests/security/test-validator.cpp b/tests/unit-tests/security/test-validator.cpp
index 40e667d..b8d6157 100644
--- a/tests/unit-tests/security/test-validator.cpp
+++ b/tests/unit-tests/security/test-validator.cpp
@@ -33,7 +33,9 @@
void
onValidated(const shared_ptr<const Data>& data)
-{ BOOST_CHECK(true); }
+{
+ BOOST_CHECK(true);
+}
void
onValidationFailed(const shared_ptr<const Data>& data, const string& failureInfo)
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();