mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +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) {
|
bool EntityTree::verifyDecryptedNonce(const QString& certID, const QString& decryptedNonce) {
|
||||||
|
|
||||||
QReadLocker certIdMapLocker(&_entityCertificateIDMapLock);
|
EntityItemID id;
|
||||||
EntityItemID id = _entityCertificateIDMap.value(certID);
|
{
|
||||||
|
QReadLocker certIdMapLocker(&_entityCertificateIDMapLock);
|
||||||
|
id = _entityCertificateIDMap.value(certID);
|
||||||
|
}
|
||||||
|
|
||||||
QWriteLocker locker(&_certNonceMapLock);
|
QString actualNonce;
|
||||||
QString actualNonce = _certNonceMap.take(certID).toString();
|
{
|
||||||
|
QWriteLocker locker(&_certNonceMapLock);
|
||||||
|
actualNonce = _certNonceMap.take(certID).toString();
|
||||||
|
}
|
||||||
|
|
||||||
bool verificationSuccess = (actualNonce == decryptedNonce);
|
bool verificationSuccess = (actualNonce == decryptedNonce);
|
||||||
if (!verificationSuccess) {
|
if (!verificationSuccess) {
|
||||||
|
|
Loading…
Reference in a new issue