From patchwork Tue Feb 9 10:59:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 8259971 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1143EBEEE5 for ; Tue, 9 Feb 2016 10:59:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7B4DD2026D for ; Tue, 9 Feb 2016 10:59:35 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A8E7F20251 for ; Tue, 9 Feb 2016 10:59:34 +0000 (UTC) Received: from localhost ([::1]:54298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT617-0002KC-Vz for patchwork-qemu-devel@patchwork.kernel.org; Tue, 09 Feb 2016 05:59:33 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT60x-0002Jv-Oe for qemu-devel@nongnu.org; Tue, 09 Feb 2016 05:59:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aT60u-00021k-Jx for qemu-devel@nongnu.org; Tue, 09 Feb 2016 05:59:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43213) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT60u-00021g-EJ for qemu-devel@nongnu.org; Tue, 09 Feb 2016 05:59:20 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id EA9CF3B759 for ; Tue, 9 Feb 2016 10:59:19 +0000 (UTC) Received: from donizetti.redhat.com (ovpn-112-47.ams2.redhat.com [10.36.112.47]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u19AxIo7001398; Tue, 9 Feb 2016 05:59:18 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 9 Feb 2016 11:59:15 +0100 Message-Id: <1455015557-15106-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] qemu-char, io: fix ordering of arguments for UDP socket creation X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Two wrongs make a right, but they should be fixed anyway. Cc: Daniel P. Berrange Signed-off-by: Paolo Bonzini Signed-off-by: Daniel P. Berrange --- 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;