Re: [PATCHv2 2/7] conf: clear and parse functions for dns host/srv/txt records

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/10/2012 02:23 PM, Laine Stump wrote:
> Since there is only a single virNetworkDNSDef for any virNetworkDef,
> and it's trivial to determine whether or not it contains any real
> data, it's much simpler (and fits more uniformly with the parse
> function calling sequence of the parsers for many other objects that
> are subordinates of virNetworkDef) if virNetworkDef *contains* an
> virNetworkDNSDef rather than pointing to one.
> 
> Since it is now just a part of another object rather than its own
> object, it no longer makes sense to have a *Free() function, so that
> is changed to a *Clear() function.
> 
> More importantly though, ParseXML and Clear functions are needed for
> the individual items contained in a virNetworkDNSDef (srv, txt, and
> host records), but none of them have a *Clear(), and only two of the
> three had *ParseXML() functions (both of which used a non-uniform
> arglist). Those problems are cleared up by this patch - it splits the
> higher-level Clear function into separate functions for each of the
> three, creates a parse for txt records, and cleans up the srv and host
> parsers, so we now have all the utility functions necessary to
> implement virNetworkDefUpdateDNS(Host|Srv|Txt).
> ---
>  src/conf/network_conf.c     | 412 ++++++++++++++++++++++++++------------------
>  src/conf/network_conf.h     |   8 +-
>  src/network/bridge_driver.c |  89 +++++-----
>  3 files changed, 286 insertions(+), 223 deletions(-)

Looks big, but rather straightforward.

> +virNetworkDNSHostDefParseXML(const char *networkName,
> +                             xmlNodePtr node,
> +                             virNetworkDNSHostDefPtr def,
> +                             bool partialOkay)
>  {

> +    if (def->nnames == 0&& !partialOkay) {

Spacing is off before &&.

ACK.
-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]