[routing-manager] GetFavoredOmrPrefix should return an error when Routing Manager is not running (#8565)

This commit is contained in:
whd
2022-12-21 21:14:15 -08:00
committed by GitHub
parent 54acf042b9
commit 9e0f4ae619
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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.
*
*/
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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.
*
*/