From 83b64bd2ee9ba0a21780a66c158803255f3fed1a Mon Sep 17 00:00:00 2001 From: Jakob Olsson <jakobols@kth.se> Date: Tue, 5 Jun 2018 09:26:35 +0200 Subject: [PATCH] rename ubus related structs --- dongle.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dongle.c b/dongle.c index 9ec65da..de271f1 100644 --- a/dongle.c +++ b/dongle.c @@ -562,19 +562,19 @@ fail: return UBUS_STATUS_INVALID_ARGUMENT; } -struct ubus_method infrastructure_object_methods[] = { +struct ubus_method dongle_object_methods[] = { UBUS_METHOD_NOARG("test", test), UBUS_METHOD_NOARG("list", print_list), UBUS_METHOD_NOARG("clear", clear), UBUS_METHOD("remove_device", remove_device, dev_policy)}; -struct ubus_object_type infrastructure_object_type = UBUS_OBJECT_TYPE("dongle", infrastructure_object_methods); +struct ubus_object_type dongle_object_type = UBUS_OBJECT_TYPE("dongle", dongle_object_methods); -struct ubus_object infrastructure_object = { +struct ubus_object dongle_object = { .name = "dongle", - .type = &infrastructure_object_type, - .methods = infrastructure_object_methods, - .n_methods = ARRAY_SIZE(infrastructure_object_methods), + .type = &dongle_object_type, + .methods = dongle_object_methods, + .n_methods = ARRAY_SIZE(dongle_object_methods), }; void uloop_add_get_devices(struct uloop_timeout *t) @@ -597,7 +597,7 @@ int publish_object(struct ubus_context *ctx) { int rv; - rv = ubus_add_object(ctx, &infrastructure_object); + rv = ubus_add_object(ctx, &dongle_object); if (rv) { debug_print("failed to add dongle.pin to ubus!\n"); return -1; -- GitLab