From 150dcd1aed6f9ebcf370dbb9b666e7d7c6d908e2 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 9 Feb 2016 11:59:15 +0100 Subject: [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation Two wrongs make a right, but they should be fixed anyway. Cc: Daniel P. Berrange Signed-off-by: Paolo Bonzini Message-Id: <1455015557-15106-1-git-send-email-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 22d2fd67d4..bf66a78235 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 84eb8a1fb4..2b2c56b87f 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;