mirror of
https://github.com/binary-kitchen/doorlockd
synced 2024-10-31 22:47:05 +01:00
Fixed small bug
This commit is contained in:
parent
4f2625525f
commit
21abbffeea
@ -150,13 +150,14 @@ Logic::Response Logic::_lock()
|
|||||||
Logic::Response Logic::_unlock()
|
Logic::Response Logic::_unlock()
|
||||||
{
|
{
|
||||||
_door.unlock();
|
_door.unlock();
|
||||||
_state = UNLOCKED;
|
|
||||||
_createNewToken(false);
|
_createNewToken(false);
|
||||||
|
|
||||||
if (_state == UNLOCKED)
|
if (_state == UNLOCKED)
|
||||||
{
|
{
|
||||||
_logger(LogLevel::warning, "Unable to unlock: already unlocked");
|
_logger(LogLevel::warning, "Unable to unlock: already unlocked");
|
||||||
return AlreadyUnlocked;
|
return AlreadyUnlocked;
|
||||||
|
} else {
|
||||||
|
_state = UNLOCKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
return Success;
|
return Success;
|
||||||
|
Loading…
Reference in New Issue
Block a user