uci: use correct sort index when reordering sections
When reordering, the section indexes must be 0-based while the current implementation incorrectly numbers starting with 1. Fix this by start numbering ther sections with index 0. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
66a9bad1a7
commit
92d0d75716
1 changed files with 1 additions and 1 deletions
2
uci.c
2
uci.c
|
@ -968,7 +968,7 @@ rpc_uci_order(struct ubus_context *ctx, struct ubus_object *obj,
|
||||||
struct blob_attr *cur;
|
struct blob_attr *cur;
|
||||||
struct uci_package *p = NULL;
|
struct uci_package *p = NULL;
|
||||||
struct uci_ptr ptr = { 0 };
|
struct uci_ptr ptr = { 0 };
|
||||||
int rem, i = 1;
|
int rem, i = 0;
|
||||||
|
|
||||||
blobmsg_parse(rpc_uci_order_policy, __RPC_O_MAX, tb,
|
blobmsg_parse(rpc_uci_order_policy, __RPC_O_MAX, tb,
|
||||||
blob_data(msg), blob_len(msg));
|
blob_data(msg), blob_len(msg));
|
||||||
|
|
Loading…
Reference in a new issue