mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 21:57:47 +00:00
logging: otSetDynamicLogLevel() returning OT_ERROR_DISABLED_FEATURE when not enabled. (#1832)
This commit is contained in:
committed by
Jonathan Hui
parent
be218c4cc1
commit
26fabd3a70
@@ -278,8 +278,9 @@ otLogLevel otGetDynamicLogLevel(otInstance *aInstance);
|
||||
* @param[in] aInstance A pointer to an OpenThread instance.
|
||||
* @param[in] aLogLevel The dynamic log level.
|
||||
*
|
||||
* @retval OT_ERROR_NONE The log level was changed successfully.
|
||||
* @retval OT_ERROR_NOT_CAPABLE The dynamic log level is not supported.
|
||||
* @retval OT_ERROR_NONE The log level was changed successfully.
|
||||
* @retval OT_ERROR_DISABLED_FEATURE The dynamic log level feature is disabled.
|
||||
* (@sa `OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL` configuration option).
|
||||
*
|
||||
*/
|
||||
otError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel);
|
||||
|
||||
@@ -239,7 +239,7 @@ otError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel)
|
||||
#if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL
|
||||
aInstance->mLogLevel = aLogLevel;
|
||||
#else
|
||||
error = OT_ERROR_NOT_CAPABLE;
|
||||
error = OT_ERROR_DISABLED_FEATURE;
|
||||
(void)aInstance;
|
||||
(void)aLogLevel;
|
||||
#endif
|
||||
|
||||
@@ -6068,7 +6068,7 @@ otError NcpBase::SetPropertyHandler_DEBUG_NCP_LOG_LEVEL(uint8_t header, spinel_p
|
||||
}
|
||||
else
|
||||
{
|
||||
if (errorCode == OT_ERROR_NOT_CAPABLE)
|
||||
if (errorCode == OT_ERROR_DISABLED_FEATURE)
|
||||
{
|
||||
errorCode = SendLastStatus(header, SPINEL_STATUS_INVALID_COMMAND_FOR_PROP);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user