summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-11-23 12:48:07 +0100
committerJo-Philipp Wich <jo@mein.io>2022-11-23 13:19:11 +0100
commitd2cc00310dba05de233ff18d3c830c8638f9bfdf (patch)
tree5fd5fc6734da0bacad08df7092dd6c6fa6701716 /.github
parentfdc9b6a3841d7346dab6f4aeea06322be0d3ee95 (diff)
uci: auto-load package in `ctx.foreach()` and `ctx.get_first()`
Functions that use `uci_lookup_ptr()` internally, such as `ctx.get()`, `ctx.set()` or `ctx.delete()`, implicitly load the given configuration name while the higher level functions `ctx.foreach()` or `ctx.get_first()` do not. This behaviour violates the principle of least surprise and might lead to non-deterministic program behavior as the outcome of these functions depends on prior uci operations performed on the cursor. Fix this issue by invoking `uci_load()` internally in case the given uci package name cannot be found in the cursor's package cache. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions