Skip to content

Commit 213e0e8

Browse files
committed
in authorization log, publish code instead of undefined completion status
1 parent 09dc90b commit 213e0e8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/NukiNetworkLock.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,12 @@ void NukiNetworkLock::publishAuthorizationInfo(const std::list<NukiLock::LogEntr
713713

714714
memset(str, 0, sizeof(str));
715715
NukiLock::completionStatusToString((NukiLock::CompletionStatus)log.data[3], str);
716+
717+
if (strcmp(str, "undefined") == 0)
718+
{
719+
itoa(log.data[3], str, 10);
720+
}
721+
716722
entry["completionStatus"] = str;
717723
break;
718724
case NukiLock::LoggingType::KeypadAction:

src/NukiNetworkOpener.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,12 @@ void NukiNetworkOpener::publishAuthorizationInfo(const std::list<NukiOpener::Log
574574

575575
memset(str, 0, sizeof(str));
576576
NukiOpener::completionStatusToString((NukiOpener::CompletionStatus)log.data[3], str);
577+
578+
if (strcmp(str, "undefined") == 0)
579+
{
580+
itoa(log.data[3], str, 10);
581+
}
582+
577583
entry["completionStatus"] = str;
578584
break;
579585
case NukiOpener::LoggingType::KeypadAction:

0 commit comments

Comments
 (0)