mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
IEEE1905: create ieee1905->forwarding_table section if it doesn't exist
This commit is contained in:
parent
c7ffc5afd4
commit
be6a8fc69f
1 changed files with 9 additions and 1 deletions
|
|
@ -660,6 +660,7 @@ static int get_IEEE1905ALForwardingTable_SetForwardingEnabled(char *refparam, st
|
||||||
|
|
||||||
static int set_IEEE1905ALForwardingTable_SetForwardingEnabled(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
static int set_IEEE1905ALForwardingTable_SetForwardingEnabled(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
|
||||||
{
|
{
|
||||||
|
int res = 0;
|
||||||
bool b;
|
bool b;
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
@ -669,7 +670,14 @@ static int set_IEEE1905ALForwardingTable_SetForwardingEnabled(char *refparam, st
|
||||||
break;
|
break;
|
||||||
case VALUESET:
|
case VALUESET:
|
||||||
string_to_bool(value, &b);
|
string_to_bool(value, &b);
|
||||||
dmuci_set_value("ieee1905", "forwarding_table", "forwarding_enabled", b ? "1" : "0");
|
res = dmuci_set_value("ieee1905", "forwarding_table", "forwarding_enabled", b ? "1" : "0");
|
||||||
|
if (res) {
|
||||||
|
struct uci_section *s = NULL;
|
||||||
|
|
||||||
|
dmuci_add_section("ieee1905", "forwarding_table", &s);
|
||||||
|
dmuci_rename_section_by_section(s, "forwarding_table");
|
||||||
|
dmuci_set_value("ieee1905", "forwarding_table", "forwarding_enabled", b ? "1" : "0");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue