[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 01/17] migrate: Add gboolean return type to m
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] [PATCH v5 01/17] migrate: Add gboolean return type to migrate_channel_process_incoming |
Date: |
Thu, 20 Jul 2017 09:47:55 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
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 (address@hidden) wrote:
> > > Signed-off-by: Juan Quintela <address@hidden>
> > > ---
> > > 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 :|
[Qemu-devel] [PATCH v5 03/17] qio: Create new qio_channel_{readv, writev}_all, Juan Quintela, 2017/07/17
[Qemu-devel] [PATCH v5 04/17] migration: Add multifd capability, Juan Quintela, 2017/07/17