mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-13 12:32:20 +01:00
Ticket refs #716: TR-181: Device.QoS object (Fix Shaper add_object)
This commit is contained in:
parent
e32a35a6e0
commit
51ceff2ea1
2 changed files with 16 additions and 1 deletions
15
dm/dmcwmp.c
15
dm/dmcwmp.c
|
|
@ -574,6 +574,21 @@ char *get_last_instance_icwmpd(char *package, char *section, char *opt_inst)
|
|||
return inst;
|
||||
}
|
||||
|
||||
char *get_last_instance_icwmpd_without_update(char *package, char *section, char *opt_inst)
|
||||
{
|
||||
struct uci_section *s;
|
||||
char *inst = NULL;
|
||||
char *last_inst = NULL;
|
||||
|
||||
uci_path_foreach_sections(icwmpd, package, section, s) {
|
||||
dmuci_get_value_by_section_string(s, opt_inst, &inst);
|
||||
if(last_inst)
|
||||
dmfree(last_inst);
|
||||
last_inst = dmstrdup(inst);
|
||||
}
|
||||
return inst;
|
||||
}
|
||||
|
||||
char *get_last_instance(char *package, char *section, char *opt_inst)
|
||||
{
|
||||
struct uci_section *s;
|
||||
|
|
|
|||
|
|
@ -617,7 +617,7 @@ int addObjQoSShaper(char *refparam, struct dmctx *ctx, void *data, char **instan
|
|||
struct uci_section *s, *dmmap_qos_class;
|
||||
char *last_inst= NULL, *sect_name= NULL, *qos_comment, *v;
|
||||
char ib[8];
|
||||
last_inst= get_last_instance_icwmpd("dmmap_qos", "class", "shaperinstance");
|
||||
last_inst= get_last_instance_icwmpd_without_update("dmmap_qos", "class", "shaperinstance");
|
||||
if (last_inst)
|
||||
sprintf(ib, "%s", last_inst);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue