[Libvir] [PATCH] fix UUID lookup when using the proxy

Daniel Veillard veillard at redhat.com
Tue Aug 14 12:06:09 UTC 2007


  Chasing a bug at Red Hat I noticed that the code never copied the 
UUID onto the packet sent to the proxy, which of course makes things
harder. Finding why this still worked on 32bits hosts is left as an
exercise for interested readers ! (of course I wrote that code on a 32
bits machine at the time)

One line patch enclosed,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard at redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/
-------------- next part --------------
Index: src/proxy_internal.c
===================================================================
RCS file: /data/cvs/libxen/src/proxy_internal.c,v
retrieving revision 1.33
diff -u -p -r1.33 proxy_internal.c
--- src/proxy_internal.c	6 Jul 2007 15:11:22 -0000	1.33
+++ src/proxy_internal.c	14 Aug 2007 12:02:28 -0000
@@ -852,6 +852,8 @@ xenProxyLookupByUUID(virConnectPtr conn,
     memset(&req, 0, sizeof(virProxyPacket));
     req.command = VIR_PROXY_LOOKUP_UUID;
     req.len = sizeof(virProxyPacket) + VIR_UUID_BUFLEN;
+    memcpy(&req.extra.str[0], uuid, VIR_UUID_BUFLEN);
+
     ret = xenProxyCommand(conn, (virProxyPacketPtr) &req, &req, 0);
     if (ret < 0) {
         xenProxyClose(conn);


More information about the libvir-list mailing list