On 01/03/2018 09:44, Peter Xu wrote: > Originally we were storing the GSources tag IDs. That'll be not enough > if we are going to support non-default gcontext for QIO code. Switch to > GSources without changing anything real. Now we still always pass in > NULL, which means the default gcontext. > > Signed-off-by: Peter Xu <pet...@redhat.com> > --- > include/io/net-listener.h | 21 ++++++++++++++-- > io/net-listener.c | 62 > +++++++++++++++++++++++++++++------------------ > 2 files changed, 58 insertions(+), 25 deletions(-) > > diff --git a/include/io/net-listener.h b/include/io/net-listener.h > index 56d6da7a76..566be283b3 100644 > --- a/include/io/net-listener.h > +++ b/include/io/net-listener.h > @@ -53,7 +53,7 @@ struct QIONetListener { > > char *name; > QIOChannelSocket **sioc; > - gulong *io_tag; > + GSource **io_source; > size_t nsioc; > > bool connected; > @@ -120,17 +120,34 @@ void qio_net_listener_add(QIONetListener *listener, > QIOChannelSocket *sioc); > > /** > - * qio_net_listener_set_client_func: > + * qio_net_listener_set_client_func_full: > * @listener: the network listener object > * @func: the callback function > * @data: opaque data to pass to @func > * @notify: callback to free @data > + * @context: the context that the sources will be bound to
Please add a note like "if %NULL, the default context will be used". Paolo