mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 10:29:52 +00:00
[routing-manager] PublishExternalRoute() to return success on kErrorAlready (#7715)
This commit changes `RoutingManager::PublishExternalRoute()` method to return `kErrorAlready` as `kErrorNone` (i.e., if the prefix to be published was previously published). This commit keeps the logging the same (i.e. we still log on `Already` error so we can see when/if this happens).
This commit is contained in:
committed by
Jonathan Hui
parent
0fdbfbe613
commit
d3a6268149
@@ -565,7 +565,7 @@ Error RoutingManager::PublishExternalRoute(const Ip6::Prefix &aPrefix, RoutePref
|
||||
LogWarn("Failed to publish external route %s: %s", aPrefix.ToString().AsCString(), ErrorToString(error));
|
||||
}
|
||||
|
||||
return error;
|
||||
return (error == kErrorAlready) ? kErrorNone : error;
|
||||
}
|
||||
|
||||
void RoutingManager::UnpublishExternalRoute(const Ip6::Prefix &aPrefix)
|
||||
|
||||
Reference in New Issue
Block a user