diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 9803ba95a..f4baf6265 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -604,7 +604,7 @@ void NcpBase::Log(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aLog otError error = OT_ERROR_NONE; uint8_t header = SPINEL_HEADER_FLAG | SPINEL_HEADER_IID_0; - VerifyOrExit(!mDisableStreamWrite); + VerifyOrExit(!mDisableStreamWrite, error = OT_ERROR_INVALID_STATE); VerifyOrExit(!mChangedPropsSet.IsPropertyFiltered(SPINEL_PROP_STREAM_LOG)); // If there is a pending queued response we do not allow any new log @@ -1172,6 +1172,8 @@ otError NcpBase::CommandHandler_RESET(uint8_t aHeader) mUpdateChangedPropsTask.Post(); } + sNcpInstance = NULL; + return error; }