logging: otSetDynamicLogLevel() returning OT_ERROR_DISABLED_FEATURE when not enabled. (#1832)

This commit is contained in:
Abtin Keshavarzian
2017-05-25 21:55:13 -07:00
committed by Jonathan Hui
parent be218c4cc1
commit 26fabd3a70
3 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -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);
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
}