All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] migration: Fix seg with missing port
@ 2016-09-13  9:08 Dr. David Alan Gilbert (git)
  2016-09-13  9:34 ` Daniel P. Berrange
  2016-09-13 12:07 ` Juan Quintela
  0 siblings, 2 replies; 3+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2016-09-13  9:08 UTC (permalink / raw)
  To: qemu-devel, berrange, quintela, amit.shah

From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>

The command :
   migrate tcp:localhost:

   currently segs; fix it so it now says:

   error parsing address 'localhost:'

and the same for -incoming.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

--
v2
  More Error * boilerplate
---
 migration/socket.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/migration/socket.c b/migration/socket.c
index 00de1fe..a21c0c5 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -112,8 +112,12 @@ void tcp_start_outgoing_migration(MigrationState *s,
                                   const char *host_port,
                                   Error **errp)
 {
-    SocketAddress *saddr = tcp_build_address(host_port, errp);
-    socket_start_outgoing_migration(s, saddr, errp);
+    Error *err = NULL;
+    SocketAddress *saddr = tcp_build_address(host_port, &err);
+    if (!err) {
+        socket_start_outgoing_migration(s, saddr, &err);
+    }
+    error_propagate(errp, err);
 }
 
 void unix_start_outgoing_migration(MigrationState *s,
@@ -174,8 +178,12 @@ static void socket_start_incoming_migration(SocketAddress *saddr,
 
 void tcp_start_incoming_migration(const char *host_port, Error **errp)
 {
-    SocketAddress *saddr = tcp_build_address(host_port, errp);
-    socket_start_incoming_migration(saddr, errp);
+    Error *err = NULL;
+    SocketAddress *saddr = tcp_build_address(host_port, &err);
+    if (!err) {
+        socket_start_incoming_migration(saddr, &err);
+    }
+    error_propagate(errp, err);
 }
 
 void unix_start_incoming_migration(const char *path, Error **errp)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] migration: Fix seg with missing port
  2016-09-13  9:08 [Qemu-devel] [PATCH v2] migration: Fix seg with missing port Dr. David Alan Gilbert (git)
@ 2016-09-13  9:34 ` Daniel P. Berrange
  2016-09-13 12:07 ` Juan Quintela
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel P. Berrange @ 2016-09-13  9:34 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git); +Cc: qemu-devel, quintela, amit.shah, eblake

On Tue, Sep 13, 2016 at 10:08:41AM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> 
> The command :
>    migrate tcp:localhost:
> 
>    currently segs; fix it so it now says:
> 
>    error parsing address 'localhost:'
> 
> and the same for -incoming.
> 
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> 
> --
> v2
>   More Error * boilerplate
> ---
>  migration/socket.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
> 
> diff --git a/migration/socket.c b/migration/socket.c
> index 00de1fe..a21c0c5 100644
> --- a/migration/socket.c
> +++ b/migration/socket.c
> @@ -112,8 +112,12 @@ void tcp_start_outgoing_migration(MigrationState *s,
>                                    const char *host_port,
>                                    Error **errp)
>  {
> -    SocketAddress *saddr = tcp_build_address(host_port, errp);
> -    socket_start_outgoing_migration(s, saddr, errp);
> +    Error *err = NULL;
> +    SocketAddress *saddr = tcp_build_address(host_port, &err);
> +    if (!err) {
> +        socket_start_outgoing_migration(s, saddr, &err);
> +    }
> +    error_propagate(errp, err);
>  }
>  
>  void unix_start_outgoing_migration(MigrationState *s,
> @@ -174,8 +178,12 @@ static void socket_start_incoming_migration(SocketAddress *saddr,
>  
>  void tcp_start_incoming_migration(const char *host_port, Error **errp)
>  {
> -    SocketAddress *saddr = tcp_build_address(host_port, errp);
> -    socket_start_incoming_migration(saddr, errp);
> +    Error *err = NULL;
> +    SocketAddress *saddr = tcp_build_address(host_port, &err);
> +    if (!err) {
> +        socket_start_incoming_migration(saddr, &err);
> +    }
> +    error_propagate(errp, err);
>  }
>  
>  void unix_start_incoming_migration(const char *path, Error **errp)

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] migration: Fix seg with missing port
  2016-09-13  9:08 [Qemu-devel] [PATCH v2] migration: Fix seg with missing port Dr. David Alan Gilbert (git)
  2016-09-13  9:34 ` Daniel P. Berrange
@ 2016-09-13 12:07 ` Juan Quintela
  1 sibling, 0 replies; 3+ messages in thread
From: Juan Quintela @ 2016-09-13 12:07 UTC (permalink / raw)
  To: Dr. David Alan Gilbert (git); +Cc: qemu-devel, berrange, amit.shah, eblake

"Dr. David Alan Gilbert (git)" <dgilbert@redhat.com> wrote:
> From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>
> The command :
>    migrate tcp:localhost:
>
>    currently segs; fix it so it now says:
>
>    error parsing address 'localhost:'
>
> and the same for -incoming.
>
> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
>
> --
> v2
>   More Error * boilerplate

Reviewed-by: Juan Quintela <quintela@redhat.com>

Integrated for 2.8 on my tree.

Thanks,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-13 12:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-13  9:08 [Qemu-devel] [PATCH v2] migration: Fix seg with missing port Dr. David Alan Gilbert (git)
2016-09-13  9:34 ` Daniel P. Berrange
2016-09-13 12:07 ` Juan Quintela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.