Re: [libvirt] [PATCH] Fixed URI parsing

2012-02-25 Thread Michal Novotny
On 02/24/2012 07:48 PM, Martin Kletzander wrote: Function xmlParseURI does not remove square brackets around IPv6 address when parsing. One of the solutions is making wrappers around functions working with xmlURI*. This assures that uri-server will be always properly assigned and it doesn't

[libvirt] [PATCH] Fixed URI parsing

2012-02-24 Thread Martin Kletzander
Function xmlParseURI does not remove square brackets around IPv6 address when parsing. One of the solutions is making wrappers around functions working with xmlURI*. This assures that uri-server will be always properly assigned and it doesn't have to be changed when used on some new place in the

Re: [libvirt] [PATCH] Fixed URI parsing

2012-02-24 Thread Eric Blake
On 02/24/2012 11:48 AM, Martin Kletzander wrote: Function xmlParseURI does not remove square brackets around IPv6 address when parsing. One of the solutions is making wrappers around functions working with xmlURI*. This assures that uri-server will be always properly assigned and it doesn't

Re: [libvirt] [PATCH] Fixed URI parsing

2012-02-13 Thread Martin Kletzander
On 02/09/2012 06:53 PM, Laine Stump wrote: The problems I can see with that: 1) That would require you to once again modify the server string in-place, but you can't rely on it still having the 2 extra bytes, so you would have to create a new string. Modifying the server is not a

[libvirt] [PATCH] Fixed URI parsing

2012-02-09 Thread Martin Kletzander
Function virParseURI was added. This function is wrapper around xmlParseURI. In this wrapper we are fixing what doesn't seems to be fixed in libxml2 in the near future. The wrapper is written in such way that if anything gets fixed in libxml2, it'll still work. File changes: - src/util/xml.h

Re: [libvirt] [PATCH] Fixed URI parsing

2012-02-09 Thread Laine Stump
On 02/09/2012 09:43 AM, Martin Kletzander wrote: Function virParseURI was added. This function is wrapper around xmlParseURI. In this wrapper we are fixing what doesn't seems to be fixed in libxml2 in the near future. The wrapper is written in such way that if anything gets fixed in libxml2,

Re: [libvirt] [PATCH] Fixed URI parsing

2012-02-09 Thread Martin Kletzander
On 02/09/2012 04:38 PM, Laine Stump wrote: On 02/09/2012 09:43 AM, Martin Kletzander wrote: Function virParseURI was added. This function is wrapper around xmlParseURI. In this wrapper we are fixing what doesn't seems to be fixed in libxml2 in the near future. The wrapper is written in such

Re: [libvirt] [PATCH] Fixed URI parsing

2012-02-09 Thread Laine Stump
On 02/09/2012 11:48 AM, Martin Kletzander wrote: On 02/09/2012 04:38 PM, Laine Stump wrote: On 02/09/2012 09:43 AM, Martin Kletzander wrote: Function virParseURI was added. This function is wrapper around xmlParseURI. In this wrapper we are fixing what doesn't seems to be fixed in libxml2 in

Re: [libvirt] [PATCH] Fixed URI parsing

2012-02-09 Thread Eric Blake
On 02/09/2012 10:53 AM, Laine Stump wrote: memmove(ret-server, ret-server+1, last-1) I know about memmove(), it's just that in this case I really didn't like that it copes the string somewhere else and than again back (in case of overlapping) but no problem to change this :-)