qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Lei Li <lilei@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Lei Li <lilei@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH] net: fix bug in net_init_socket
Date: Thu,  1 Nov 2012 17:39:55 +0800	[thread overview]
Message-ID: <1351762795-31934-1-git-send-email-lilei@linux.vnet.ibm.com> (raw)

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 <lilei@linux.vnet.ibm.com>
---
 net/socket.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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.7.6

             reply	other threads:[~2012-11-01  9:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01  9:39 Lei Li [this message]
2012-11-01 10:05 ` [Qemu-devel] [PATCH] net: fix bug in net_init_socket Stefan Hajnoczi
2012-11-02  2:11   ` Lei Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351762795-31934-1-git-send-email-lilei@linux.vnet.ibm.com \
    --to=lilei@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).