still return the parent info even if device is router (#1875)

This commit is contained in:
rongli
2017-06-04 10:36:45 -07:00
committed by Jonathan Hui
parent 473b83b02f
commit e9e78fc3a3
-3
View File
@@ -304,9 +304,6 @@ otError otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo)
otError error = OT_ERROR_NONE;
Router *parent;
VerifyOrExit(aInstance->mThreadNetif.GetMle().GetRole() == OT_DEVICE_ROLE_CHILD,
error = OT_ERROR_INVALID_STATE);
VerifyOrExit(aParentInfo != NULL, error = OT_ERROR_INVALID_ARGS);
parent = aInstance->mThreadNetif.GetMle().GetParent();