On Tue, Oct 16, 2007 at 07:18:13AM +0100, Richard W.M. Jones wrote: > Daniel Veillard wrote: > >On Mon, Oct 15, 2007 at 08:33:08PM +0100, Daniel P. Berrange wrote: > >>On Mon, Oct 15, 2007 at 04:37:22PM +0100, Richard W.M. Jones wrote: > >>>Daniel P. Berrange wrote: > >>>>It is a bug in xend_internal.c > >>>> > >>>> if (strcasecmp (name, "xen") == 0 || > >>>> strncasecmp (name, "xen:///", 7) == 0) { > >>>> > >>>> > >>>>This needs to die & be replaced with code calling the libxml URI > >>>>parsing. > >>>>I fixed a similar bug in the QEMU driver a few weeks back. > >>>Sorry yes, Dan is right, so ignore the hack/patch I just posted. > >>> > >>>In fact xen_unified.c already parses the URI once, so we just need to > >>>change the xen_unified <-> xen low level drivers API to pass the parsed > >>>URI instead of the name string. > >>In fact we could take it one bit further. Have the 'do_open' method in > >>the src/libvirt.c file parse it & change the src/driver.h so that the > >>open method for drivers takes xmlURIPtr instead of a char *. That way > >>we guarentee that all drivers will use a correctly parsed form. > > > > Sounds good but we would have to reserialize for the network access > >I assume. > > Yes, it already does this because it has to reconstruct a URI suitable > for the remote end of the connection. Specifically one which doesn't > contain the transport, server and port. (Otherwise the remote end might > try to do another remote connection, which wouldn't be fun). oh, right, of course ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list