mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-01 17:35:33 +01:00
Fix the refresh instances order
This commit is contained in:
parent
b0614ecfd3
commit
fc99617d4c
1 changed files with 7 additions and 7 deletions
|
|
@ -597,8 +597,8 @@ int bbfdm_set_handler(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
|
||||
if (data.trans_id == 0) {
|
||||
// Internal transaction: need to commit the changes
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
transaction_commit(NULL, trans_id, true);
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -721,8 +721,8 @@ int bbfdm_add_handler(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
|
||||
if (data.trans_id == 0) {
|
||||
// Internal transaction: need to abort the changes
|
||||
register_instance_refresh_timer(ctx, 0);
|
||||
transaction_abort(NULL, trans_id);
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
}
|
||||
|
||||
goto end;
|
||||
|
|
@ -740,8 +740,8 @@ int bbfdm_add_handler(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
|
||||
if (data.trans_id == 0) {
|
||||
// Internal transaction: need to abort the changes
|
||||
register_instance_refresh_timer(ctx, 0);
|
||||
transaction_abort(NULL, trans_id);
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
}
|
||||
|
||||
free_pv_list(&pv_list);
|
||||
|
|
@ -757,8 +757,8 @@ int bbfdm_add_handler(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
|
||||
if (data.trans_id == 0) {
|
||||
// Internal transaction: need to commit the changes
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
transaction_commit(NULL, trans_id, true);
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -846,8 +846,8 @@ int bbfdm_del_handler(struct ubus_context *ctx, struct ubus_object *obj,
|
|||
|
||||
if (data.trans_id == 0) {
|
||||
// Internal transaction: need to commit the changes
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
transaction_commit(NULL, trans_id, true);
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
}
|
||||
|
||||
end:
|
||||
|
|
@ -924,12 +924,12 @@ static int bbfdm_transaction_handler(struct ubus_context *ctx, struct ubus_objec
|
|||
transaction_status(&data.bb);
|
||||
}
|
||||
} else if (is_str_eq(trans_cmd, "commit")) {
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
ret = transaction_commit(&data, data.trans_id, is_service_restart);
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
blobmsg_add_u8(&data.bb, "status", (ret == 0));
|
||||
} else if (is_str_eq(trans_cmd, "abort")) {
|
||||
register_instance_refresh_timer(ctx, 0);
|
||||
ret = transaction_abort(&data, data.trans_id);
|
||||
register_instance_refresh_timer(ctx, 100);
|
||||
blobmsg_add_u8(&data.bb, "status", (ret == 0));
|
||||
} else if (is_str_eq(trans_cmd, "status")) {
|
||||
transaction_status(&data.bb);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue