Fixed small bug

This commit is contained in:
Ralf Ramsauer 2015-05-14 22:12:32 +02:00
parent 4f2625525f
commit 21abbffeea
1 changed files with 2 additions and 1 deletions

View File

@ -150,13 +150,14 @@ Logic::Response Logic::_lock()
Logic::Response Logic::_unlock()
{
_door.unlock();
_state = UNLOCKED;
_createNewToken(false);
if (_state == UNLOCKED)
{
_logger(LogLevel::warning, "Unable to unlock: already unlocked");
return AlreadyUnlocked;
} else {
_state = UNLOCKED;
}
return Success;