From: Noel Kuntze Date: Mon, 25 Mar 2024 17:22:30 +0000 (-0600) Subject: uci: Upstream patch to adapt to option datatype abstraction X-Git-Tag: android-2.5.2~33^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b190539197f18ab5e3629caf4aa7397d47dfaad;p=thirdparty%2Fstrongswan.git uci: Upstream patch to adapt to option datatype abstraction This is a patch from the OpenWrt package sources necessary to adapt to changes from 2008 that abstracted the option datatype (added a list type). Signed-off-by: Noel Kuntze Reviewed-by: Philip Prindeville --- diff --git a/src/libcharon/plugins/uci/uci_parser.c b/src/libcharon/plugins/uci/uci_parser.c index 0689642d0a..c34c897b00 100644 --- a/src/libcharon/plugins/uci/uci_parser.c +++ b/src/libcharon/plugins/uci/uci_parser.c @@ -76,7 +76,7 @@ METHOD(enumerator_t, section_enumerator_enumerate, bool, if (uci_lookup(this->ctx, &element, this->package, this->current->name, "name") == UCI_OK) { /* use "name" attribute as config name if available ... */ - *value = uci_to_option(element)->value; + *value = uci_to_option(element)->v.string; } else { /* ... or the section name becomes config name */ @@ -91,7 +91,7 @@ METHOD(enumerator_t, section_enumerator_enumerate, bool, if (value && uci_lookup(this->ctx, &element, this->package, this->current->name, this->keywords[i]) == UCI_OK) { - *value = uci_to_option(element)->value; + *value = uci_to_option(element)->v.string; } }