From 12d5f793e7a99b34ca9a52a71d9d6df0207f2dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Maciejo=C5=84czyk?= <32327281+lmaciejonczyk@users.noreply.github.com> Date: Tue, 16 Mar 2021 20:53:27 +0100 Subject: [PATCH] [ncp] remove unused code (#6288) For the case when otInstanceReset returns during pseudo reset action setting here SPINEL_STATUS_RESET_SOFTWARE is useless as line below the current sNcpInstance is cleared. The new status never gets a chance to be transmitted to the host. --- src/ncp/ncp_base.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 46f355fcc..8268c86ce 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -1214,14 +1214,6 @@ otError NcpBase::CommandHandler_RESET(uint8_t aHeader) IgnoreError(otIp6SetEnabled(mInstance, false)); #endif - error = WriteLastStatusFrame(SPINEL_HEADER_FLAG | SPINEL_HEADER_IID_0, SPINEL_STATUS_RESET_SOFTWARE); - - if (error != OT_ERROR_NONE) - { - mChangedPropsSet.AddLastStatus(SPINEL_STATUS_RESET_UNKNOWN); - mUpdateChangedPropsTask.Post(); - } - sNcpInstance = nullptr; return error;