src: Minor corrections and improvements
Change-Id: If1041d13b7c469e64e3523297438067baf96b1d6
This commit is contained in:
1 parent
8b1674ad59
commit
24b75c8930
10 files changed
+38
-25
No files matched your search
+5
-1
@@ -135,10 +135,14 @@ class gchx(Task.Task):
|
||||
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
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
|
||||
|
||||
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 @@ public:
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
return m_extensionId;
|
||||
}
|
||||
|
||||
inline const bool
|
||||
inline bool
|
||||
getIsCritical() const
|
||||
{
|
||||
return m_isCritical;
|
||||
|
||||
@@ -887,7 +887,7 @@ KeyChain::signPacketWrapper(Interest& interest, const SignatureSha256WithRsa& si
|
||||
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);
|
||||
|
||||
@@ -131,7 +131,7 @@ private:
|
||||
{
|
||||
}
|
||||
|
||||
const KeyType
|
||||
KeyType
|
||||
getKeyType() const
|
||||
{
|
||||
return m_keyType;
|
||||
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
* @param keyType
|
||||
* @returns MAC OS key type
|
||||
*/
|
||||
const CFTypeRef
|
||||
CFTypeRef
|
||||
getSymKeyType(KeyType keyType);
|
||||
|
||||
/**
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
* @param keyType
|
||||
* @returns MAC OS key type
|
||||
*/
|
||||
const CFTypeRef
|
||||
CFTypeRef
|
||||
getAsymKeyType(KeyType keyType);
|
||||
|
||||
/**
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
* @param keyClass
|
||||
* @returns MAC OS key class
|
||||
*/
|
||||
const CFTypeRef
|
||||
CFTypeRef
|
||||
getKeyClass(KeyClass keyClass);
|
||||
|
||||
/**
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
* @param digestAlgo
|
||||
* @returns MAC OS algorithm id
|
||||
*/
|
||||
const CFStringRef
|
||||
CFStringRef
|
||||
getDigestAlgorithm(DigestAlgorithm digestAlgo);
|
||||
|
||||
/**
|
||||
@@ -1010,7 +1010,7 @@ SecTpmOsx::Impl::toInternalKeyName(const Name& keyName, KeyClass keyClass)
|
||||
return keyUri;
|
||||
}
|
||||
|
||||
const CFTypeRef
|
||||
CFTypeRef
|
||||
SecTpmOsx::Impl::getAsymKeyType(KeyType keyType)
|
||||
{
|
||||
switch (keyType){
|
||||
@@ -1021,7 +1021,7 @@ SecTpmOsx::Impl::getAsymKeyType(KeyType keyType)
|
||||
}
|
||||
}
|
||||
|
||||
const CFTypeRef
|
||||
CFTypeRef
|
||||
SecTpmOsx::Impl::getSymKeyType(KeyType keyType)
|
||||
{
|
||||
switch (keyType){
|
||||
@@ -1032,7 +1032,7 @@ SecTpmOsx::Impl::getSymKeyType(KeyType keyType)
|
||||
}
|
||||
}
|
||||
|
||||
const CFTypeRef
|
||||
CFTypeRef
|
||||
SecTpmOsx::Impl::getKeyClass(KeyClass keyClass)
|
||||
{
|
||||
switch (keyClass){
|
||||
@@ -1047,7 +1047,7 @@ SecTpmOsx::Impl::getKeyClass(KeyClass keyClass)
|
||||
}
|
||||
}
|
||||
|
||||
const CFStringRef
|
||||
CFStringRef
|
||||
SecTpmOsx::Impl::getDigestAlgorithm(DigestAlgorithm digestAlgo)
|
||||
{
|
||||
switch (digestAlgo){
|
||||
|
||||
@@ -66,11 +66,14 @@ class CommandInterestFixture
|
||||
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 @@ public:
|
||||
|
||||
void
|
||||
reset()
|
||||
{ m_validity = false; }
|
||||
{
|
||||
m_validity = false;
|
||||
}
|
||||
|
||||
bool m_validity;
|
||||
};
|
||||
|
||||
@@ -33,7 +33,9 @@ BOOST_AUTO_TEST_SUITE(SecurityTestValidator)
|
||||
|
||||
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)
|
||||
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
|
||||
private:
|
||||
void
|
||||
onData(const Interest& interest, Data& data);
|
||||
onData(Data& data);
|
||||
|
||||
void
|
||||
onTimeout(const Interest& interest);
|
||||
@@ -84,7 +84,7 @@ Consumer::run()
|
||||
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 @@ Consumer::run()
|
||||
}
|
||||
|
||||
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 @@ Consumer::onData(const Interest& interest, Data& data)
|
||||
interest.setMustBeFresh(m_mustBeFresh);
|
||||
|
||||
m_face.expressInterest(interest,
|
||||
bind(&Consumer::onData, this, _1, _2),
|
||||
bind(&Consumer::onData, this, _2),
|
||||
bind(&Consumer::onTimeout, this, _1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
}
|
||||
|
||||
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 @@ public:
|
||||
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 @@ public:
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
Reference in new issue
Block a user