From 8098565bb1c0935ffd6a35de28adca952a6b9bba Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Fri, 21 Jan 2022 11:06:58 -0500 Subject: [PATCH] remove emberCurremtCommnad (#13818) --- src/app/clusters/on-off-server/on-off-server.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index a7f8f1361fd405..f2b36f379413c7 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -296,9 +296,9 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a { #ifdef EMBER_AF_PLUGIN_SCENES GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; - if (emberAfCurrentCommand()->type == EMBER_INCOMING_MULTICAST) + if (commandObj->GetExchangeContext()->IsGroupExchangeContext()) { - groupId = emberAfCurrentCommand()->source->GetSessionHandle()->AsGroupSession()->GetGroupId(); + groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsGroupSession()->GetGroupId(); } emberAfScenesClusterStoreCurrentSceneCallback(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID); @@ -351,9 +351,9 @@ bool OnOffServer::OnWithRecallGlobalSceneCommand(app::CommandHandler * commandOb #ifdef EMBER_AF_PLUGIN_SCENES GroupId groupId = ZCL_SCENES_GLOBAL_SCENE_GROUP_ID; - if (emberAfCurrentCommand()->type == EMBER_INCOMING_MULTICAST) + if (commandObj->GetExchangeContext()->IsGroupExchangeContext()) { - groupId = emberAfCurrentCommand()->source->GetSessionHandle()->AsGroupSession()->GetGroupId(); + groupId = commandObj->GetExchangeContext()->GetSessionHandle()->AsGroupSession()->GetGroupId(); } emberAfScenesClusterRecallSavedSceneCallback(fabric, endpoint, groupId, ZCL_SCENES_GLOBAL_SCENE_SCENE_ID);