Skip to content

Commit

Permalink
[border-agent] log enhancements (#10549)
Browse files Browse the repository at this point in the history
This commit updates logs on secure session establishment and
commissioner for accuracy.
  • Loading branch information
librasungirl authored Aug 5, 2024
1 parent 54d1072 commit 91eef98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/meshcop/border_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ void BorderAgent::HandleCoapResponse(const ForwardContext &aForwardContext,
LogInfo("Commissioner accepted - SessionId:%u ALOC:%s", sessionId,
mCommissionerAloc.GetAddress().ToString().AsCString());
}
else
{
LogInfo("Commissioner rejected");
}
}

SuccessOrExit(error = aForwardContext.ToHeader(*message, aResponse->GetCode()));
Expand Down Expand Up @@ -640,13 +644,13 @@ void BorderAgent::HandleConnected(bool aConnected)
{
if (aConnected)
{
LogInfo("Commissioner connected");
LogInfo("SecureSession connected");
mState = kStateConnected;
mTimer.Start(kKeepAliveTimeout);
}
else
{
LogInfo("Commissioner disconnected");
LogInfo("SecureSession disconnected");
IgnoreError(Get<Ip6::Udp>().RemoveReceiver(mUdpReceiver));
Get<ThreadNetif>().RemoveUnicastAddress(mCommissionerAloc);

Expand Down

0 comments on commit 91eef98

Please sign in to comment.