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>
Wed, 4 Oct 2017 19:56:10 +0000 (21:56 +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 fa7d4352a8d578ace32ff0140a643b618684a40d..f539273b4ad17ec54eb7163b82fb18712c2d3557 100644 (file)
@@ -248,7 +248,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;