Skip to content
Snippets Groups Projects
Commit 83b64bd2 authored by Jakob Olsson's avatar Jakob Olsson
Browse files

rename ubus related structs

parent a1b9be03
No related branches found
No related tags found
No related merge requests found
...@@ -562,19 +562,19 @@ fail: ...@@ -562,19 +562,19 @@ fail:
return UBUS_STATUS_INVALID_ARGUMENT; 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("test", test),
UBUS_METHOD_NOARG("list", print_list), UBUS_METHOD_NOARG("list", print_list),
UBUS_METHOD_NOARG("clear", clear), UBUS_METHOD_NOARG("clear", clear),
UBUS_METHOD("remove_device", remove_device, dev_policy)}; 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", .name = "dongle",
.type = &infrastructure_object_type, .type = &dongle_object_type,
.methods = infrastructure_object_methods, .methods = dongle_object_methods,
.n_methods = ARRAY_SIZE(infrastructure_object_methods), .n_methods = ARRAY_SIZE(dongle_object_methods),
}; };
void uloop_add_get_devices(struct uloop_timeout *t) void uloop_add_get_devices(struct uloop_timeout *t)
...@@ -597,7 +597,7 @@ int publish_object(struct ubus_context *ctx) ...@@ -597,7 +597,7 @@ int publish_object(struct ubus_context *ctx)
{ {
int rv; int rv;
rv = ubus_add_object(ctx, &infrastructure_object); rv = ubus_add_object(ctx, &dongle_object);
if (rv) { if (rv) {
debug_print("failed to add dongle.pin to ubus!\n"); debug_print("failed to add dongle.pin to ubus!\n");
return -1; return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment