service: fix SERVICE_ATTR_NAME usage in service_handle_set
authorpme.lebleu@gmail.com <pme.lebleu@gmail.com>
Wed, 4 Oct 2017 11:14:16 +0000 (13:14 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 5 Oct 2017 07:27:20 +0000 (09:27 +0200)
The SERVICE_SET_NAME belongs to enum SERVICE_SET_XXXX, not SERVICE_ATTR_NAME.

Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
service/service.c

index 02a29fa3f97690a3e9228bf8de7737d62a3acaf8..9c798aae67c97f1ef6c75ffba8d215d6dcad185e 100644 (file)
@@ -267,7 +267,7 @@ service_handle_set(struct ubus_context *ctx, struct ubus_object *obj,
        int ret;
 
        blobmsg_parse(service_set_attrs, __SERVICE_SET_MAX, tb, blob_data(msg), blob_len(msg));
-       cur = tb[SERVICE_ATTR_NAME];
+       cur = tb[SERVICE_SET_NAME];
        if (!cur)
                return UBUS_STATUS_INVALID_ARGUMENT;