]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fixed URI parsing
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 24 Feb 2012 18:48:55 +0000 (19:48 +0100)
committerEric Blake <eblake@redhat.com>
Fri, 24 Feb 2012 23:49:21 +0000 (16:49 -0700)
commit9f748277bbd17d031f80d28e6d2fc4b52e8d5715
treed01b242c29bb10c50a96918e55e7c70d0dc8d570
parent801a60ff88e06087dd8fc2cf09b6b7b6b6d83f6d
Fixed URI parsing

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 code.
For this purpose, functions virParseURI and virSaveURI were
added. These function are wrappers around xmlParseURI and xmlSaveUri
respectively.
Also there is one new syntax check function to prohibit these functions
anywhere else.

File changes:
 - src/util/viruri.h        -- declaration
 - src/util/viruri.c        -- definition
 - src/libvirt_private.syms -- symbol export
 - src/Makefile.am          -- added source and header files
 - cfg.mk                   -- added sc_prohibit_xmlURI
 - all others               -- ID name and include fixes
30 files changed:
cfg.mk
src/Makefile.am
src/datatypes.h
src/driver.h
src/esx/esx_driver.c
src/esx/esx_util.c
src/esx/esx_util.h
src/hyperv/hyperv_util.c
src/hyperv/hyperv_util.h
src/libvirt.c
src/libvirt_private.syms
src/libxl/libxl_driver.c
src/lxc/lxc_driver.c
src/openvz/openvz_driver.c
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/remote/remote_driver.c
src/uml/uml_driver.c
src/util/qparams.c
src/util/viruri.c [new file with mode: 0644]
src/util/viruri.h [new file with mode: 0644]
src/vbox/vbox_tmpl.c
src/vmx/vmx.c
src/xen/xen_driver.c
src/xen/xen_hypervisor.h
src/xen/xend_internal.c
src/xen/xend_internal.h
src/xenapi/xenapi_driver.c
src/xenapi/xenapi_utils.c
src/xenapi/xenapi_utils.h