[libvirt] [libvirt-glib] Add API to redefine an existing domain
Marc-André Lureau
marcandre.lureau at gmail.com
Mon Nov 21 20:12:11 UTC 2011
On Mon, Nov 21, 2011 at 9:02 PM, Zeeshan Ali (Khattak)
<zeeshanak at gnome.org> wrote:
> + g_return_val_if_fail(err == NULL || *err == NULL, FALSE);
this needs update, as I wrote before.
> + xml = gvir_config_object_to_xml(GVIR_CONFIG_OBJECT(conf));
hmm, don't we need to free xml?
> + virDomainGetUUIDString(priv->handle, uuid);
> +
> + if (strcmp (uuid, priv->uuid) != 0) {
> + if (err != NULL)
> + *err = gvir_error_new_literal(GVIR_DOMAIN_ERROR,
I prefer g_strcmp0, because it's safer.
But the main issue is that you don't say clearly if we can safely
ignore that new handle, at the very least if there is no leakage. A
comment in the code would be welcome.
regards
--
Marc-André Lureau
More information about the libvir-list
mailing list