mirror of
https://dev.iopsys.eu/multi-ap/ieee1905.git
synced 2025-12-20 00:52:14 +08:00
tr181: Fix LocalOnlyMode logic for Get method
This commit is contained in:
committed by
IOPSYS Dev
parent
c685111f87
commit
85fa0fe16d
@@ -162,9 +162,9 @@
|
||||
{
|
||||
"name": "enabled",
|
||||
"type": "boolean",
|
||||
"required": "yes",
|
||||
"default": "0",
|
||||
"description": "Enable interface"
|
||||
"required": "no",
|
||||
"default": "1",
|
||||
"description": "Enable management of interface as 1905 AL interface"
|
||||
},
|
||||
{
|
||||
"name": "ifname",
|
||||
|
||||
@@ -582,7 +582,10 @@ static int get_IEEE1905AL_InterfaceNumberOfEntries(char *refparam, struct dmctx
|
||||
|
||||
static int get_IEEE1905AL_LocalOnlyMode(char *refparam, struct dmctx *ctx, void *data, char *instance, char **value)
|
||||
{
|
||||
return dmuci_get_option_value_string("ieee1905", "@al-iface[0]", "enabled", value);
|
||||
char *enable = dmuci_get_option_value_fallback_def("ieee1905", "@al-iface[0]", "enabled", "1");
|
||||
|
||||
*value = (DM_STRCMP(enable, "1") == 0) ? "0" : "1";
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int set_IEEE1905AL_LocalOnlyMode(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||
|
||||
Reference in New Issue
Block a user