Skip to content

Commit

Permalink
[meshcop-leader] update local variable name to follow convention (ope…
Browse files Browse the repository at this point in the history
  • Loading branch information
abtink authored Oct 13, 2023
1 parent 17e433c commit 9876468
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core/meshcop/meshcop_leader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ void Leader::SendDatasetChanged(const Ip6::Address &aAddress)
Error Leader::SetDelayTimerMinimal(uint32_t aDelayTimerMinimal)
{
Error error = kErrorNone;

VerifyOrExit((aDelayTimerMinimal != 0 && aDelayTimerMinimal < DelayTimerTlv::kDelayTimerDefault),
error = kErrorInvalidArgs);
mDelayTimerMinimal = aDelayTimerMinimal;
Expand All @@ -253,13 +254,13 @@ void Leader::HandleTimer(void)

void Leader::SetEmptyCommissionerData(void)
{
CommissionerSessionIdTlv mCommissionerSessionId;
CommissionerSessionIdTlv sessionIdTlv;

mCommissionerSessionId.Init();
mCommissionerSessionId.SetCommissionerSessionId(++mSessionId);
sessionIdTlv.Init();
sessionIdTlv.SetCommissionerSessionId(++mSessionId);

IgnoreError(Get<NetworkData::Leader>().SetCommissioningData(reinterpret_cast<uint8_t *>(&mCommissionerSessionId),
sizeof(Tlv) + mCommissionerSessionId.GetLength()));
IgnoreError(Get<NetworkData::Leader>().SetCommissioningData(reinterpret_cast<uint8_t *>(&sessionIdTlv),
sizeof(Tlv) + sessionIdTlv.GetLength()));
}

void Leader::ResignCommissioner(void)
Expand Down

0 comments on commit 9876468

Please sign in to comment.