+struct hello_request {
+ struct ubus_request_data req;
+ struct uloop_timeout timeout;
+ char data[];
+};
+
+static void test_hello_reply(struct uloop_timeout *t)
+{
+ struct hello_request *req = container_of(t, struct hello_request, timeout);
+
+ blob_buf_init(&b, 0);
+ blobmsg_add_string(&b, "message", req->data);
+ ubus_send_reply(ctx, &req->req, b.head);
+ ubus_complete_deferred_request(ctx, &req->req, 0);
+ free(req);
+}
+