]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
uci: Upstream patch to adapt to option datatype abstraction
authorNoel Kuntze <noel.kuntze@thermi.consulting>
Mon, 25 Mar 2024 17:22:30 +0000 (11:22 -0600)
committerTobias Brunner <tobias@strongswan.org>
Wed, 3 Apr 2024 06:41:42 +0000 (08:41 +0200)
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 <noel.kuntze@thermi.consulting>
Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
src/libcharon/plugins/uci/uci_parser.c

index 0689642d0a9b0442282b466201bca99ded54f589..c34c897b00bcd6f8b51e4e17658dbb3bc9fe2cfd 100644 (file)
@@ -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;
                }
        }