mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-08 06:32:55 -04:00
* removed debugging from gpg cache.
* fixed position of #endif git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4954 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
50e7ee76ea
commit
9544b61d77
1 changed files with 20 additions and 3 deletions
|
@ -427,12 +427,14 @@ void AuthGPGimpl::processServices()
|
||||||
/* don't bother loading - if we already have the certificate */
|
/* don't bother loading - if we already have the certificate */
|
||||||
if (isGPGId(loadOrSave->m_certGpgId))
|
if (isGPGId(loadOrSave->m_certGpgId))
|
||||||
{
|
{
|
||||||
|
#ifdef GPG_DEBUG
|
||||||
std::cerr << "AuthGPGimpl::processServices() Skipping load - already have it" << std::endl;
|
std::cerr << "AuthGPGimpl::processServices() Skipping load - already have it" << std::endl;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cerr << "AuthGPGimpl::processServices() Process load operation" << std::endl;
|
|
||||||
#ifdef GPG_DEBUG
|
#ifdef GPG_DEBUG
|
||||||
|
std::cerr << "AuthGPGimpl::processServices() Process load operation" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
std::string error_string ;
|
std::string error_string ;
|
||||||
LoadCertificateFromString(loadOrSave->m_certGpg, loadOrSave->m_certGpgId,error_string);
|
LoadCertificateFromString(loadOrSave->m_certGpg, loadOrSave->m_certGpgId,error_string);
|
||||||
|
@ -490,11 +492,18 @@ void AuthGPGimpl::processServices()
|
||||||
loadOrSave->m_certGpg = "";
|
loadOrSave->m_certGpg = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
cacheGPGCertificate(loadOrSave->m_certGpgId, loadOrSave->m_certGpg);
|
cacheGPGCertificate(loadOrSave->m_certGpgId, loadOrSave->m_certGpg);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GPG_DEBUG
|
||||||
|
std::cerr << "Certificate for: " << loadOrSave->m_certGpgId << " is: ";
|
||||||
|
std::cerr << std::endl;
|
||||||
|
std::cerr << loadOrSave->m_certGpg;
|
||||||
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
service->setGPGOperation(loadOrSave);
|
service->setGPGOperation(loadOrSave);
|
||||||
|
@ -1419,14 +1428,18 @@ bool AuthGPGimpl::cacheGPGCertificate(const std::string &id, const std::string
|
||||||
{
|
{
|
||||||
it->second.mCachedCert = certificate;
|
it->second.mCachedCert = certificate;
|
||||||
it->second.mHaveCachedCert = true;
|
it->second.mHaveCachedCert = true;
|
||||||
|
#ifdef GPG_DEBUG
|
||||||
std::cerr << "AuthGPGimpl::cacheGPGCertificate() success for: " << id;
|
std::cerr << "AuthGPGimpl::cacheGPGCertificate() success for: " << id;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef GPG_DEBUG
|
||||||
std::cerr << "AuthGPGimpl::cacheGPGCertificate() failed for: " << id;
|
std::cerr << "AuthGPGimpl::cacheGPGCertificate() failed for: " << id;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1441,14 +1454,18 @@ bool AuthGPGimpl::getCachedGPGCertificate(const std::string &id, std::string &ce
|
||||||
{
|
{
|
||||||
certificate = it->second.mCachedCert;
|
certificate = it->second.mCachedCert;
|
||||||
|
|
||||||
|
#ifdef GPG_DEBUG
|
||||||
std::cerr << "AuthGPGimpl::getCachedGPGCertificate() success for: " << id;
|
std::cerr << "AuthGPGimpl::getCachedGPGCertificate() success for: " << id;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef GPG_DEBUG
|
||||||
std::cerr << "AuthGPGimpl::getCachedGPGCertificate() failed for: " << id;
|
std::cerr << "AuthGPGimpl::getCachedGPGCertificate() failed for: " << id;
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue