Skip to content

Commit

Permalink
qemu-char, io: fix ordering of arguments for UDP socket creation
Browse files Browse the repository at this point in the history
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>
Message-Id: <1455015557-15106-1-git-send-email-pbonzini@redhat.com>
  • Loading branch information
bonzini committed Feb 9, 2016
1 parent c9a19d5 commit 150dcd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion io/channel-socket.c
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion qemu-char.c
Expand Up @@ -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;
Expand Down

0 comments on commit 150dcd1

Please sign in to comment.