X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fubus.git;a=blobdiff_plain;f=ubus-example.c;h=9e1b1d91b6bfebaf093765e15dd6428bc01b0dde;hp=298a7dd1386db620990a3b262d369c2c9193e9fd;hb=a93b044d6a5a4bed51d776cb0950e7d20fb17b84;hpb=7a56ab0411fefef9ec0388818058638f02c6536b diff --git a/ubus-example.c b/ubus-example.c index 298a7dd..9e1b1d9 100644 --- a/ubus-example.c +++ b/ubus-example.c @@ -98,18 +98,18 @@ int main(int argc, char **argv) fprintf(stderr, "Connected as ID 0x%08x\n", ctx->local_id); fprintf(stderr, "Publishing object\n"); - ret = ubus_publish(ctx, &test_object); + ret = ubus_add_object(ctx, &test_object); if (ret) - fprintf(stderr, "Failed to publish object: %s\n", ubus_strerror(ret)); + fprintf(stderr, "Failed to add_object object: %s\n", ubus_strerror(ret)); else { fprintf(stderr, "Object ID: %08x\n", test_object.id); fprintf(stderr, "Object Type ID: %08x\n", test_object.type->id); } fprintf(stderr, "Publishing object\n"); - ret = ubus_publish(ctx, &test_object2); + ret = ubus_add_object(ctx, &test_object2); if (ret) - fprintf(stderr, "Failed to publish object: %s\n", ubus_strerror(ret)); + fprintf(stderr, "Failed to add_object object: %s\n", ubus_strerror(ret)); else { fprintf(stderr, "Object ID: %08x\n", test_object2.id); fprintf(stderr, "Object Type ID: %08x\n", test_object2.type->id);