mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Fix deadlock
This commit is contained in:
parent
960f1fbfe4
commit
3c572b0f7a
1 changed files with 10 additions and 4 deletions
|
@ -1191,11 +1191,17 @@ QByteArray EntityTree::computeEncryptedNonce(const QString& certID, const QStrin
|
|||
|
||||
bool EntityTree::verifyDecryptedNonce(const QString& certID, const QString& decryptedNonce) {
|
||||
|
||||
QReadLocker certIdMapLocker(&_entityCertificateIDMapLock);
|
||||
EntityItemID id = _entityCertificateIDMap.value(certID);
|
||||
EntityItemID id;
|
||||
{
|
||||
QReadLocker certIdMapLocker(&_entityCertificateIDMapLock);
|
||||
id = _entityCertificateIDMap.value(certID);
|
||||
}
|
||||
|
||||
QWriteLocker locker(&_certNonceMapLock);
|
||||
QString actualNonce = _certNonceMap.take(certID).toString();
|
||||
QString actualNonce;
|
||||
{
|
||||
QWriteLocker locker(&_certNonceMapLock);
|
||||
actualNonce = _certNonceMap.take(certID).toString();
|
||||
}
|
||||
|
||||
bool verificationSuccess = (actualNonce == decryptedNonce);
|
||||
if (!verificationSuccess) {
|
||||
|
|
Loading…
Reference in a new issue