Re: [libvirt-glib] Remove transient domain reference on shutdown

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

 



On Tue, Nov 29, 2011 at 07:40:21PM +0200, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx>
> 
> ---
>  libvirt-gobject/libvirt-gobject-connection.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/libvirt-gobject/libvirt-gobject-connection.c b/libvirt-gobject/libvirt-gobject-connection.c
> index b647bfa..59b828d 100644
> --- a/libvirt-gobject/libvirt-gobject-connection.c
> +++ b/libvirt-gobject/libvirt-gobject-connection.c
> @@ -362,6 +362,15 @@ static int domain_event_cb(virConnectPtr conn G_GNUC_UNUSED,
>                  g_signal_emit_by_name(gdom, "stopped::from-snapshot");
>              else
>                  g_warn_if_reached();
> +
> +            if (virDomainIsPersistent(dom) != 1) {
> +                g_mutex_lock(priv->lock);
> +                g_hash_table_steal(priv->domains, uuid);
> +                g_mutex_unlock(priv->lock);
> +
> +                g_signal_emit(gconn, signals[VIR_DOMAIN_REMOVED], 0, gdom);
> +                g_object_unref(gdom);
> +            }
>              break;
>  
>          default:

ACK


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
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]