mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2026-03-10 19:27:32 +01:00
fix restart service issu fro add/del object
This commit is contained in:
parent
703c35651b
commit
c874a4e2a1
2 changed files with 6 additions and 2 deletions
|
|
@ -136,12 +136,14 @@ int dm_entry_param_method(struct dmctx *ctx, int cmd, char *inparam, char *arg1,
|
|||
fault = dm_entry_add_object(ctx);
|
||||
if (!fault) {
|
||||
dmuci_set_value("cwmp", "acs", "ParameterKey", arg1 ? arg1 : "");
|
||||
dmuci_change_packages(&head_package_change);
|
||||
}
|
||||
break;
|
||||
case CMD_DEL_OBJECT:
|
||||
fault = dm_entry_delete_object(ctx);
|
||||
if (!fault) {
|
||||
dmuci_set_value("cwmp", "acs", "ParameterKey", arg1 ? arg1 : "");
|
||||
dmuci_change_packages(&head_package_change);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -261,6 +263,8 @@ int dm_entry_restart_services()
|
|||
json_object *res;
|
||||
|
||||
list_for_each_entry(pc, &head_package_change, list) {
|
||||
if(strcmp(pc->package, "cwmp") == 0)
|
||||
continue;
|
||||
dmubus_call("uci", "commit", UBUS_ARGS{{"config", pc->package}}, 1, &res);
|
||||
}
|
||||
free_all_list_package_change(&head_package_change);
|
||||
|
|
|
|||
|
|
@ -350,10 +350,10 @@ int add_line_object(struct dmctx *ctx, char **instancepara)
|
|||
*instancepara = update_vp_line_instance(s, section_name(sipargs->sip_section)); //TODO: To Check
|
||||
dmuci_get_value_by_section_string(sipargs->sip_section, "call_lines", &value);
|
||||
if (value[0] == '\0') {
|
||||
sprintf(call_lines, "%d", i);
|
||||
sprintf(call_lines, "%d", i - 1);
|
||||
}
|
||||
else {
|
||||
sprintf(call_lines, "%s %d", value, i);
|
||||
sprintf(call_lines, "%s %d", value, i - 1);
|
||||
}
|
||||
dmuci_set_value_by_section(sipargs->sip_section, "call_lines", call_lines);
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue