[LEDE-DEV] [PATCH] procd: service_handle_set() should use SERVICE_SET_NAME rather than SERVICE_ATTR_NAME

Pierre Lebleu pme.lebleu at gmail.com
Wed Oct 4 04:04:01 PDT 2017


2017-10-04 12:54 GMT+02:00 Mathias Kresin <dev at kresin.me>:
> 2017-10-04 12:49 GMT+02:00  <pme.lebleu at gmail.com>:
>> From: Pierre Lebleu <pme.lebleu at gmail.com>
>>
>
> ^^^ and here should be an explanation why SERVICE_SET_NAME should be
> used in favour of SERVICE_ATTR_NAME.
The SERVICE_SET_NAME belongs to enum SERVICE_SET_XXXX, not SERVICE_ATTR_NAME.

>
>> Signed-off-by: Pierre Lebleu <pme.lebleu at gmail.com>
>> ---
>>  service/service.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/service/service.c b/service/service.c
>> index 02a29fa..9c798aa 100644
>> --- a/service/service.c
>> +++ b/service/service.c
>> @@ -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;
>>
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> Lede-dev mailing list
>> Lede-dev at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/lede-dev



More information about the Lede-dev mailing list