mirror of
https://github.com/espressif/openthread.git
synced 2026-08-08 11:47:46 +00:00
[routing-manager] GetFavoredOmrPrefix should return an error when Routing Manager is not running (#8565)
This commit is contained in:
@@ -190,7 +190,7 @@ otError otBorderRoutingGetOmrPrefix(otInstance *aInstance, otIp6Prefix *aPrefix)
|
||||
* @param[out] aPrefix A pointer to output the favored OMR prefix.
|
||||
* @param[out] aPreference A pointer to output the preference associated the favored prefix.
|
||||
*
|
||||
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not initialized yet.
|
||||
* @retval OT_ERROR_INVALID_STATE The Border Routing Manager is not running yet.
|
||||
* @retval OT_ERROR_NONE Successfully retrieved the favored OMR prefix.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -53,7 +53,7 @@ extern "C" {
|
||||
* @note This number versions both OpenThread platform and user APIs.
|
||||
*
|
||||
*/
|
||||
#define OPENTHREAD_API_VERSION (271)
|
||||
#define OPENTHREAD_API_VERSION (272)
|
||||
|
||||
/**
|
||||
* @addtogroup api-instance
|
||||
|
||||
@@ -148,7 +148,7 @@ Error RoutingManager::GetFavoredOmrPrefix(Ip6::Prefix &aPrefix, RoutePreference
|
||||
{
|
||||
Error error = kErrorNone;
|
||||
|
||||
VerifyOrExit(IsInitialized(), error = kErrorInvalidState);
|
||||
VerifyOrExit(IsRunning(), error = kErrorInvalidState);
|
||||
aPrefix = mFavoredOmrPrefix.GetPrefix();
|
||||
aPreference = mFavoredOmrPrefix.GetPreference();
|
||||
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
* @param[out] aPrefix A reference to output the favored prefix.
|
||||
* @param[out] aPreference A reference to output the preference associated with the favored OMR prefix.
|
||||
*
|
||||
* @retval kErrorInvalidState The Border Routing Manager is not initialized yet.
|
||||
* @retval kErrorInvalidState The Border Routing Manager is not running yet.
|
||||
* @retval kErrorNone Successfully retrieved the OMR prefix.
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user