1.1 --- a/libfsserver/lib/pipes/pipe_opener_resource.cc Wed May 19 00:01:41 2021 +0200
1.2 +++ b/libfsserver/lib/pipes/pipe_opener_resource.cc Wed May 19 00:38:36 2021 +0200
1.3 @@ -62,22 +62,14 @@
1.4 return open_endpoint(paging, false, reader) || open_endpoint(paging, true, writer);
1.5 }
1.6
1.7 +/* Start the endpoint server in a new thread. If the thread does not start, the
1.8 + resource (including pager) will be finalised. */
1.9 +
1.10 long PipeOpenerResource::open_endpoint(PipePaging *paging, bool writing, l4_cap_idx_t *endpoint)
1.11 {
1.12 PipePager *pager = new PipePager(paging, writing);
1.13
1.14 - /* Start the endpoint server in a new thread.
1.15 - If the thread does not start, the resource should be finalised. */
1.16 -
1.17 - ResourceServer server(pager);
1.18 - long err = server.start_thread();
1.19 -
1.20 - /* Return the server capability to the caller. */
1.21 -
1.22 - if (!err)
1.23 - *endpoint = server.config()->server;
1.24 -
1.25 - return err;
1.26 + return ResourceServer(pager).start_thread(endpoint);
1.27 }
1.28
1.29 // vim: tabstop=4 expandtab shiftwidth=4