mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
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 <noel.kuntze@thermi.consulting> Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
parent
b73a476c1f
commit
1b19053919
@ -76,7 +76,7 @@ METHOD(enumerator_t, section_enumerator_enumerate, bool,
|
|||||||
if (uci_lookup(this->ctx, &element, this->package,
|
if (uci_lookup(this->ctx, &element, this->package,
|
||||||
this->current->name, "name") == UCI_OK)
|
this->current->name, "name") == UCI_OK)
|
||||||
{ /* use "name" attribute as config name if available ... */
|
{ /* use "name" attribute as config name if available ... */
|
||||||
*value = uci_to_option(element)->value;
|
*value = uci_to_option(element)->v.string;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* ... or the section name becomes config name */
|
{ /* ... 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,
|
if (value && uci_lookup(this->ctx, &element, this->package,
|
||||||
this->current->name, this->keywords[i]) == UCI_OK)
|
this->current->name, this->keywords[i]) == UCI_OK)
|
||||||
{
|
{
|
||||||
*value = uci_to_option(element)->value;
|
*value = uci_to_option(element)->v.string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user