mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 05:40:27 +00:00
Clean up error names. (#1764)
This commit is contained in:
@@ -85,10 +85,10 @@ void otInstancePostConstructor(otInstance *aInstance)
|
||||
// If auto start is configured, do that now
|
||||
if (otThreadGetAutoStart(aInstance))
|
||||
{
|
||||
if (otIp6SetEnabled(aInstance, true) == kThreadError_None)
|
||||
if (otIp6SetEnabled(aInstance, true) == OT_ERROR_NONE)
|
||||
{
|
||||
// Only try to start Thread if we could bring up the interface
|
||||
if (otThreadSetEnabled(aInstance, true) != kThreadError_None)
|
||||
if (otThreadSetEnabled(aInstance, true) != OT_ERROR_NONE)
|
||||
{
|
||||
// Bring the interface down if Thread failed to start
|
||||
otIp6SetEnabled(aInstance, false);
|
||||
@@ -166,9 +166,9 @@ void otInstanceFinalize(otInstance *aInstance)
|
||||
otLogFuncExit();
|
||||
}
|
||||
|
||||
ThreadError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aCallbackContext)
|
||||
otError otSetStateChangedCallback(otInstance *aInstance, otStateChangedCallback aCallback, void *aCallbackContext)
|
||||
{
|
||||
ThreadError error = kThreadError_NoBufs;
|
||||
otError error = OT_ERROR_NO_BUFS;
|
||||
|
||||
for (size_t i = 0; i < OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS; i++)
|
||||
{
|
||||
@@ -207,11 +207,11 @@ void otInstanceFactoryReset(otInstance *aInstance)
|
||||
otPlatReset(aInstance);
|
||||
}
|
||||
|
||||
ThreadError otInstanceErasePersistentInfo(otInstance *aInstance)
|
||||
otError otInstanceErasePersistentInfo(otInstance *aInstance)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
otError error = OT_ERROR_NONE;
|
||||
|
||||
VerifyOrExit(otThreadGetDeviceRole(aInstance) == kDeviceRoleDisabled, error = kThreadError_InvalidState);
|
||||
VerifyOrExit(otThreadGetDeviceRole(aInstance) == kDeviceRoleDisabled, error = OT_ERROR_INVALID_STATE);
|
||||
otPlatSettingsWipe(aInstance);
|
||||
|
||||
exit:
|
||||
@@ -232,14 +232,14 @@ otLogLevel otGetDynamicLogLevel(otInstance *aInstance)
|
||||
return logLevel;
|
||||
}
|
||||
|
||||
ThreadError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel)
|
||||
otError otSetDynamicLogLevel(otInstance *aInstance, otLogLevel aLogLevel)
|
||||
{
|
||||
ThreadError error = kThreadError_None;
|
||||
otError error = OT_ERROR_NONE;
|
||||
|
||||
#if OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL
|
||||
aInstance->mLogLevel = aLogLevel;
|
||||
#else
|
||||
error = kThreadError_NotCapable;
|
||||
error = OT_ERROR_NOT_CAPABLE;
|
||||
(void)aInstance;
|
||||
(void)aLogLevel;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user