From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTsiw-0006bV-Qm for qemu-devel@nongnu.org; Thu, 01 Nov 2012 07:14:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTsis-0008Vv-0W for qemu-devel@nongnu.org; Thu, 01 Nov 2012 07:14:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTsir-0008Vr-Nn for qemu-devel@nongnu.org; Thu, 01 Nov 2012 07:14:05 -0400 From: Stefan Hajnoczi Date: Thu, 1 Nov 2012 12:10:16 +0100 Message-Id: <1351768218-21466-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1351768218-21466-1-git-send-email-stefanha@redhat.com> References: <1351768218-21466-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH 2/4] net: use "socket" model name for UDP sockets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Stefan Hajnoczi , Lei Li From: Lei Li Fix the problem that can not delete the udp socket. It's caused by passing "udp" model to net_socket_udp_init, but we do not have "udp" model in our model list. Pass the right model "socket" to init function. https://bugs.launchpad.net/qemu/+bug/1073585?comments=all Signed-off-by: Lei Li Signed-off-by: Stefan Hajnoczi --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/socket.c b/net/socket.c index b75d567..c01323d 100644 --- a/net/socket.c +++ b/net/socket.c @@ -747,7 +747,7 @@ int net_init_socket(const NetClientOptions *opts, const char *name, error_report("localaddr= is mandatory with udp="); return -1; } - if (net_socket_udp_init(peer, "udp", name, sock->udp, sock->localaddr) == + if (net_socket_udp_init(peer, "socket", name, sock->udp, sock->localaddr) == -1) { return -1; } -- 1.7.12.1