From 57b89eef4fd2680187b144ffbd1710f2808b1b42 Mon Sep 17 00:00:00 2001 From: erwinpan1 Date: Fri, 9 Feb 2024 17:45:09 +0800 Subject: [PATCH] Break right away when rename index found --- .../chef/common/clusters/audio-output/AudioOutputManager.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp b/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp index 35e6bfe0815a11..83cf0f9866d8fe 100644 --- a/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp +++ b/examples/chef/common/clusters/audio-output/AudioOutputManager.cpp @@ -68,6 +68,7 @@ bool AudioOutputManager::HandleRenameOutput(const uint8_t & index, const chip::C const size_t len = std::min(mBufMax, name.size()); memcpy(this->Data(index), name.data(), len); output.name = chip::CharSpan(this->Data(index), len); + return audioOutputRenamed; } } @@ -83,6 +84,7 @@ bool AudioOutputManager::HandleSelectOutput(const uint8_t & index) { audioOutputSelected = true; mCurrentOutput = index; + return audioOutputSelected; } }