diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2016-09-13 10:08:41 +0100 |
---|---|---|
committer | Juan Quintela <quintela@trasno.org> | 2016-10-13 17:23:53 +0200 |
commit | 9308ae54858a86f2955e0b45f74d6e1f9c38820b (patch) | |
tree | 9234a178d6c5b6aa1d32af4210574b5ae841596c /migration/socket.c | |
parent | 5cf0f48d2aa860877c992030854540ba82dfe8fa (diff) | |
download | qemu-9308ae54858a86f2955e0b45f74d6e1f9c38820b.zip qemu-9308ae54858a86f2955e0b45f74d6e1f9c38820b.tar.gz qemu-9308ae54858a86f2955e0b45f74d6e1f9c38820b.tar.bz2 |
migration: Fix seg with missing port
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>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/socket.c')
-rw-r--r-- | migration/socket.c | 16 |
1 files 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) |