From 50285e4c5361cd82300c626bddc88711b5cde6aa Mon Sep 17 00:00:00 2001 From: kangping Date: Thu, 21 Oct 2021 07:59:04 +0800 Subject: [PATCH] [srp-server] include SRP update ID in log messages (#7089) --- src/core/net/srp_server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/net/srp_server.cpp b/src/core/net/srp_server.cpp index 0c1d6c9a2..d73156f37 100644 --- a/src/core/net/srp_server.cpp +++ b/src/core/net/srp_server.cpp @@ -338,7 +338,7 @@ void Server::HandleServiceUpdateResult(ServiceUpdateId aId, Error aError) } else { - otLogInfoSrp("[server] delayed SRP host update result, the SRP update has been committed"); + otLogInfoSrp("[server] delayed SRP host update result, the SRP update has been committed (updateId = %u)", aId); } } @@ -1406,9 +1406,10 @@ void Server::HandleOutstandingUpdatesTimer(Timer &aTimer) void Server::HandleOutstandingUpdatesTimer(void) { - otLogInfoSrp("[server] outstanding service update timeout"); while (!mOutstandingUpdates.IsEmpty() && mOutstandingUpdates.GetTail()->GetExpireTime() <= TimerMilli::GetNow()) { + otLogInfoSrp("[server] outstanding service update timeout (updateId = %u)", + mOutstandingUpdates.GetTail()->GetId()); HandleServiceUpdateResult(mOutstandingUpdates.GetTail(), kErrorResponseTimeout); } }