From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35455) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwjoQ-0003r4-Dj for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:02:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwjoP-0003Ja-8v for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:02:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwjoP-0003JM-0o for qemu-devel@nongnu.org; Wed, 01 Aug 2012 21:02:49 -0400 From: Luiz Capitulino Date: Wed, 1 Aug 2012 22:02:37 -0300 Message-Id: <1343869374-23417-18-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> References: <1343869374-23417-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 17/34] qerror: drop QERR_SOCKET_CONNECT_IN_PROGRESS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, eblake@redhat.com This error is currently returned by inet_connect_opts(), however it causes the follow spurious message on HMP: (qemu) migrate tcp:0:4444 migrate: Connection can not be completed immediately (qemu) But migration succeeds. inet_connect_opts() has a 'in_progress' argument that callers can use to check whether a connection is in progress. The QERR_ macro is not needed anymore. PS: I didn't test with QMP, but I guess the migrate command will return an error response. Signed-off-by: Luiz Capitulino --- qemu-sockets.c | 2 -- qerror.c | 4 ---- qerror.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index 82f4736..7196c5f 100644 --- a/qemu-sockets.c +++ b/qemu-sockets.c @@ -284,8 +284,6 @@ int inet_connect_opts(QemuOpts *opts, bool *in_progress, Error **errp) if (in_progress) { *in_progress = true; } - - error_set(errp, QERR_SOCKET_CONNECT_IN_PROGRESS); } else if (rc < 0) { if (NULL == e->ai_next) fprintf(stderr, "%s: connect(%s,%s,%s,%s): %s\n", __FUNCTION__, diff --git a/qerror.c b/qerror.c index 691d8a8..33b8780 100644 --- a/qerror.c +++ b/qerror.c @@ -309,10 +309,6 @@ static const QErrorStringTable qerror_table[] = { .desc = "Could not start VNC server on %(target)", }, { - .error_fmt = QERR_SOCKET_CONNECT_IN_PROGRESS, - .desc = "Connection can not be completed immediately", - }, - { .error_fmt = QERR_SOCKET_CONNECT_FAILED, .desc = "Failed to connect to socket", }, diff --git a/qerror.h b/qerror.h index de8497d..52ce58d 100644 --- a/qerror.h +++ b/qerror.h @@ -240,9 +240,6 @@ char *qerror_format(const char *fmt, QDict *error); #define QERR_VNC_SERVER_FAILED \ "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }" -#define QERR_SOCKET_CONNECT_IN_PROGRESS \ - "{ 'class': 'SockConnectInprogress', 'data': {} }" - #define QERR_SOCKET_CONNECT_FAILED \ "{ 'class': 'SockConnectFailed', 'data': {} }" -- 1.7.11.2.249.g31c7954.dirty