mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
find missing unlock
This commit is contained in:
parent
03804ed24a
commit
f849abc386
@ -339,7 +339,7 @@ void SessionManager::checkTimeoutSession()
|
|||||||
Poco::Mutex::ScopedLock _lock(mWorkingMutex, 500);
|
Poco::Mutex::ScopedLock _lock(mWorkingMutex, 500);
|
||||||
}
|
}
|
||||||
catch (Poco::TimeoutException &ex) {
|
catch (Poco::TimeoutException &ex) {
|
||||||
printf("[SessionManager::checkTimeoutSession] exception timout mutex: %s\n", ex.displayText().data());
|
printf("[SessionManager::checkTimeoutSession] exception timeout mutex: %s\n", ex.displayText().data());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//mWorkingMutex.lock();
|
//mWorkingMutex.lock();
|
||||||
|
|||||||
@ -239,7 +239,7 @@ bool Session::createUser(const std::string& first_name, const std::string& last_
|
|||||||
|
|
||||||
bool Session::updateEmailVerification(Poco::UInt64 emailVerificationCode)
|
bool Session::updateEmailVerification(Poco::UInt64 emailVerificationCode)
|
||||||
{
|
{
|
||||||
|
lock("Session::updateEmailVerification");
|
||||||
Profiler usedTime;
|
Profiler usedTime;
|
||||||
const static char* funcName = "Session::updateEmailVerification";
|
const static char* funcName = "Session::updateEmailVerification";
|
||||||
auto em = ErrorManager::getInstance();
|
auto em = ErrorManager::getInstance();
|
||||||
@ -270,7 +270,7 @@ bool Session::updateEmailVerification(Poco::UInt64 emailVerificationCode)
|
|||||||
}
|
}
|
||||||
updateState(SESSION_STATE_EMAIL_VERIFICATION_CODE_CHECKED);
|
updateState(SESSION_STATE_EMAIL_VERIFICATION_CODE_CHECKED);
|
||||||
//printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
//printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
||||||
|
unlock();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -280,6 +280,7 @@ bool Session::updateEmailVerification(Poco::UInt64 emailVerificationCode)
|
|||||||
if (!updated_rows) {
|
if (!updated_rows) {
|
||||||
addError(new Error(gettext("E-Mail Verification"), gettext("Der Code stimmt nicht, bitte überprüfe ihn nochmal oder registriere dich erneut oder wende dich an den Server-Admin")));
|
addError(new Error(gettext("E-Mail Verification"), gettext("Der Code stimmt nicht, bitte überprüfe ihn nochmal oder registriere dich erneut oder wende dich an den Server-Admin")));
|
||||||
printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
||||||
|
unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,9 +288,11 @@ bool Session::updateEmailVerification(Poco::UInt64 emailVerificationCode)
|
|||||||
else {
|
else {
|
||||||
addError(new Error(gettext("E-Mail Verification"), gettext("Falscher Code für aktiven Login")));
|
addError(new Error(gettext("E-Mail Verification"), gettext("Falscher Code für aktiven Login")));
|
||||||
printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
||||||
|
unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
//printf("[%s] time: %s\n", funcName, usedTime.string().data());
|
||||||
|
unlock();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,6 +415,7 @@ UserStates Session::loadUser(const std::string& email, const std::string& passwo
|
|||||||
}
|
}
|
||||||
if (mSessionUser->getUserState() >= USER_LOADED_FROM_DB) {
|
if (mSessionUser->getUserState() >= USER_LOADED_FROM_DB) {
|
||||||
if (!mSessionUser->validatePwd(password, this)) {
|
if (!mSessionUser->validatePwd(password, this)) {
|
||||||
|
unlock();
|
||||||
return USER_PASSWORD_INCORRECT;
|
return USER_PASSWORD_INCORRECT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user