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;