From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT646-0006SQ-O1 for qemu-devel@nongnu.org; Tue, 09 Feb 2016 06:02:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aT645-0002bl-Cl for qemu-devel@nongnu.org; Tue, 09 Feb 2016 06:02:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42896) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT645-0002b2-7i for qemu-devel@nongnu.org; Tue, 09 Feb 2016 06:02:37 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id D3195A1463 for ; Tue, 9 Feb 2016 11:02:36 +0000 (UTC) Date: Tue, 9 Feb 2016 11:02:33 +0000 From: "Daniel P. Berrange" Message-ID: <20160209110233.GE24614@redhat.com> References: <1455015557-15106-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1455015557-15106-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Tue, Feb 09, 2016 at 11:59:15AM +0100, Paolo Bonzini wrote: > Two wrongs make a right, but they should be fixed anyway. > > Cc: Daniel P. Berrange > Signed-off-by: Paolo Bonzini > --- > io/channel-socket.c | 2 +- > qemu-char.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Signed-off-by: Daniel P. Berrange Looks like motivation for me to write another unit test :-) > diff --git a/io/channel-socket.c b/io/channel-socket.c > index 22d2fd6..bf66a78 100644 > --- a/io/channel-socket.c > +++ b/io/channel-socket.c > @@ -258,7 +258,7 @@ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc, > int fd; > > trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr); > - fd = socket_dgram(localAddr, remoteAddr, errp); > + fd = socket_dgram(remoteAddr, localAddr, errp); > if (fd < 0) { > trace_qio_channel_socket_dgram_fail(ioc); > return -1; > diff --git a/qemu-char.c b/qemu-char.c > index 84eb8a1..2b2c56b 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -4386,7 +4386,7 @@ static CharDriverState *qmp_chardev_open_udp(const char *id, > QIOChannelSocket *sioc = qio_channel_socket_new(); > > if (qio_channel_socket_dgram_sync(sioc, > - udp->remote, udp->local, > + udp->local, udp->remote, > errp) < 0) { > object_unref(OBJECT(sioc)); > return NULL; 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 :|