Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 38fd1360 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Don't complain when finding no tether stats.

TetherController::addForwardChainStats returns an error if it
doesn't find any tethering stats. This was fine when we were
still using CommandListener, which would not attempt to fetch
the stats if tethering was not enabled.

Instead of returning an error when no stats are found, return
an error only if the output was empty (implying that no headers
were found and thus the required rules do not exist). If the
output contains headers but no stats, don't return an error.

Returning an error was a necessity in the previous code because
it had no unit or integration tests, but such measures are not
necessary now that we have test coverage.

Fix: 65550883
Bug: 65369386
Test: bullhead builds, boots
Test: netd_{unit,integration}_test pass
Change-Id: Ie32f4d941dd52c8dc9ff09fde26cc97cedf96bc3
parent 5e03a893
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment