From 71af8794bdb0ed2f44d67b657b8dc09b7f9b198b Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 8 May 2020 17:32:09 -0700 Subject: [PATCH] [panid-query-server] change SendConflict() to return void (#4941) --- src/core/thread/panid_query_server.cpp | 15 +++++++++------ src/core/thread/panid_query_server.hpp | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/core/thread/panid_query_server.cpp b/src/core/thread/panid_query_server.cpp index fc42f77c0..8e54923b9 100644 --- a/src/core/thread/panid_query_server.cpp +++ b/src/core/thread/panid_query_server.cpp @@ -104,11 +104,11 @@ void PanIdQueryServer::HandleScanResult(Mac::ActiveScanResult *aScanResult) } else if (mChannelMask != 0) { - IgnoreError(SendConflict()); + SendConflict(); } } -otError PanIdQueryServer::SendConflict(void) +void PanIdQueryServer::SendConflict(void) { otError error = OT_ERROR_NONE; MeshCoP::ChannelMaskTlv channelMask; @@ -135,12 +135,15 @@ otError PanIdQueryServer::SendConflict(void) exit: - if (error != OT_ERROR_NONE && message != NULL) + if (error != OT_ERROR_NONE) { - message->Free(); - } + otLogWarnMeshCoP("Failed to send panid conflict: %s", otThreadErrorToString(error)); - return error; + if (message != NULL) + { + message->Free(); + } + } } void PanIdQueryServer::HandleTimer(Timer &aTimer) diff --git a/src/core/thread/panid_query_server.hpp b/src/core/thread/panid_query_server.hpp index 01b93a1ea..78050388f 100644 --- a/src/core/thread/panid_query_server.hpp +++ b/src/core/thread/panid_query_server.hpp @@ -75,7 +75,7 @@ private: static void HandleUdpReceive(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo); - otError SendConflict(void); + void SendConflict(void); Ip6::Address mCommissioner; uint32_t mChannelMask;