On Sat, Nov 19, 2011 at 01:02:28AM +0200, Zeeshan Ali (Khattak) wrote:
> On Sat, Nov 19, 2011 at 12:56 AM, Christophe Fergeau
> <cferg...@redhat.com> wrote:
> > Hey,
> >
> > Reading this patch, I'm wondering if gvir_domain_set_config might achieve
> > what you are after (it's not implemented either)
> 
>   Yeah, that might actually be better.
> 
> 
> >> +    GVirConnectionPrivate *priv = conn->priv;
> >> +
> >> +    xml = gvir_config_object_to_xml(GVIR_CONFIG_OBJECT(conf));
> >> +
> >> +    g_return_if_fail(xml != NULL);
> >> +
> >> +    g_mutex_lock(priv->lock);
> >> +    dom = g_hash_table_lookup (priv->domains,
> >> +                               (gpointer)gvir_domain_get_uuid(domain));
> >> +    g_mutex_unlock(priv->lock);
> >> +    g_return_if_fail(dom != NULL);
> >> +    /* FIXME: Check if config's domain ID is the same as domain passed */
> >> +
> >> +    if (!(handle = virDomainDefineXML(priv->conn, xml))) {
> >
> > Shouldn't handle be assigned to some persistent state? My guess is
> > domain->priv->handle.
> 
>  No, there is supposed to be already a corresponding domain with the
> handle in hash table. Don't let the 'DomainDefineXML' name fool you.

No need for the handle variable then. This is one of the things that
fooled me :)

Christophe

Attachment: pgpSNZJXy8LNy.pgp
Description: PGP signature

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

Reply via email to