qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com, amit.shah@redhat.com,
	eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] migration: Fix seg with missing port
Date: Tue, 13 Sep 2016 10:34:30 +0100	[thread overview]
Message-ID: <20160913093430.GH30949@redhat.com> (raw)
In-Reply-To: <1473757721-10601-1-git-send-email-dgilbert@redhat.com>

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 :|

  reply	other threads:[~2016-09-13  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-09-13 12:07 ` Juan Quintela

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160913093430.GH30949@redhat.com \
    --to=berrange@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).