On Tue, Jan 26, 2016 at 12:11:55PM +0000, Frediano Ziglio wrote: > This increase code reuse and make Glib integration more straight forward. > > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > server/red-worker.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/server/red-worker.c b/server/red-worker.c > index a5822a4..05e21f0 100644 > --- a/server/red-worker.c > +++ b/server/red-worker.c > @@ -69,6 +69,7 @@ struct RedWorker { > pthread_t thread; > QXLInstance *qxl; > RedDispatcher *red_dispatcher; > + SpiceWatch *dispatch_watch; > int running; > SpiceCoreInterfaceInternal core; > struct pollfd poll_fds[MAX_EVENT_SOURCES]; > @@ -1544,11 +1545,10 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher) > worker->poll_fds[i].fd = -1; > } > > - worker->poll_fds[0].fd = dispatcher_get_recv_fd(dispatcher); > - worker->poll_fds[0].events = POLLIN; > - worker->watches[0].worker = worker; > - worker->watches[0].watch_func = handle_dev_input; > - worker->watches[0].watch_func_opaque = worker; > + worker->dispatch_watch = > + worker->core.watch_add(&worker->core, dispatcher_get_recv_fd(dispatcher), > + SPICE_WATCH_EVENT_READ, handle_dev_input, worker); > + spice_assert(worker->dispatch_watch != NULL); ACK, I was surprised this was done by hand, but did not look if it was possible to remove this, thanks for investigating that! Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel