* [Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation
@ 2016-02-09 10:59 Paolo Bonzini
2016-02-09 11:02 ` Daniel P. Berrange
0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2016-02-09 10:59 UTC (permalink / raw)
To: qemu-devel
Two wrongs make a right, but they should be fixed anyway.
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
io/channel-socket.c | 2 +-
qemu-char.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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;
--
2.5.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation
2016-02-09 10:59 [Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation Paolo Bonzini
@ 2016-02-09 11:02 ` Daniel P. Berrange
0 siblings, 0 replies; 2+ messages in thread
From: Daniel P. Berrange @ 2016-02-09 11:02 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel
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 <berrange@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> io/channel-socket.c | 2 +-
> qemu-char.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
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 :|
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-09 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 10:59 [Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation Paolo Bonzini
2016-02-09 11:02 ` Daniel P. Berrange
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).