On Thu, Jul 20, 2017 at 03:00:23PM +0800, Peter Xu wrote: > On Wed, Jul 19, 2017 at 04:01:10PM +0100, Dr. David Alan Gilbert wrote: > > * Juan Quintela (quint...@redhat.com) wrote: > > > Signed-off-by: Juan Quintela <quint...@redhat.com> > > > --- > > > migration/channel.c | 3 ++- > > > migration/channel.h | 2 +- > > > migration/exec.c | 6 ++++-- > > > migration/socket.c | 12 ++++++++---- > > > 4 files changed, 15 insertions(+), 8 deletions(-) > > > > > > diff --git a/migration/channel.c b/migration/channel.c > > > index 3b7252f..719055d 100644 > > > --- a/migration/channel.c > > > +++ b/migration/channel.c > > > @@ -19,7 +19,7 @@ > > > #include "qapi/error.h" > > > #include "io/channel-tls.h" > > > > > > -void migration_channel_process_incoming(QIOChannel *ioc) > > > +gboolean migration_channel_process_incoming(QIOChannel *ioc) > > > { > > > MigrationState *s = migrate_get_current(); > > > > > > @@ -39,6 +39,7 @@ void migration_channel_process_incoming(QIOChannel *ioc) > > > QEMUFile *f = qemu_fopen_channel_input(ioc); > > > migration_fd_process_incoming(f); > > > } > > > + return FALSE; /* unregister */ > > > } > > > > > > > > > diff --git a/migration/channel.h b/migration/channel.h > > > index e4b4057..72cbc9f 100644 > > > --- a/migration/channel.h > > > +++ b/migration/channel.h > > > @@ -18,7 +18,7 @@ > > > > > > #include "io/channel.h" > > > > > > -void migration_channel_process_incoming(QIOChannel *ioc); > > > +gboolean migration_channel_process_incoming(QIOChannel *ioc); > > > > Can you add a comment here that says what the return value means. > > And, looks like we have G_SOURCE_CONTINUE and G_SOURCE_REMOVE: > > https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#G-SOURCE-CONTINUE:CAPS > > Maybe we can use them as well?
Those are newer than our min required glib version, though we could add compat defines for them Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|