qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] migration: Fix seg with missing port
@ 2016-09-12 19:03 Dr. David Alan Gilbert (git)
  2016-09-12 19:11 ` Daniel P. Berrange
  2016-09-15 14:28 ` Paolo Bonzini
  0 siblings, 2 replies; 4+ messages in thread
From: Dr. David Alan Gilbert (git) @ 2016-09-12 19:03 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.

(We know that errp is non-null; callers use a local_err).

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 migration/socket.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/migration/socket.c b/migration/socket.c
index 00de1fe..6e82924 100644
--- a/migration/socket.c
+++ b/migration/socket.c
@@ -113,7 +113,9 @@ void tcp_start_outgoing_migration(MigrationState *s,
                                   Error **errp)
 {
     SocketAddress *saddr = tcp_build_address(host_port, errp);
-    socket_start_outgoing_migration(s, saddr, errp);
+    if (!*errp) {
+        socket_start_outgoing_migration(s, saddr, errp);
+    }
 }
 
 void unix_start_outgoing_migration(MigrationState *s,
@@ -175,7 +177,9 @@ 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);
+    if (!*errp) {
+        socket_start_incoming_migration(saddr, errp);
+    }
 }
 
 void unix_start_incoming_migration(const char *path, Error **errp)
-- 
2.7.4

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

end of thread, other threads:[~2016-09-15 14:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 19:03 [Qemu-devel] [PATCH] migration: Fix seg with missing port Dr. David Alan Gilbert (git)
2016-09-12 19:11 ` Daniel P. Berrange
2016-09-12 19:23   ` Eric Blake
2016-09-15 14:28 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).