OSDN Git Service

net: use "socket" model name for UDP sockets
authorLei Li <lilei@linux.vnet.ibm.com>
Thu, 1 Nov 2012 09:39:55 +0000 (17:39 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 1 Nov 2012 10:00:59 +0000 (11:00 +0100)
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>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
net/socket.c

index b75d567..c01323d 100644 (file)
@@ -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;
     }