[virt-tools-list] [virt-viewer v1] Take reference to monitor the file transfer task
Daniel P. Berrange
berrange at redhat.com
Tue Jul 12 12:56:54 UTC 2016
On Tue, Jul 12, 2016 at 02:22:54PM +0200, Fabiano Fidêncio wrote:
> On Tue, Jul 12, 2016 at 2:19 PM, Victor Toso <victortoso at redhat.com> wrote:
> > Documentation states that:
> > "Client applications may take a reference on the @task object and use
> > it to monitor the status of the file transfer task."
> >
> > We have been monitoring SpiceFileTransferTask without reference it but
> > since the introduction of file transfer dialog we also unref it after
> > task is finished (on task_finished_remove) leading to critical
> > warnings when task original reference has been freed already.
> >
> > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > ---
> > src/virt-viewer-session-spice.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c
> > index 731f074..fdbfd5d 100644
> > --- a/src/virt-viewer-session-spice.c
> > +++ b/src/virt-viewer-session-spice.c
> > @@ -943,7 +943,7 @@ on_new_file_transfer(SpiceMainChannel *channel G_GNUC_UNUSED,
> > {
> > VirtViewerSessionSpice *self = VIRT_VIEWER_SESSION_SPICE(user_data);
> > virt_viewer_file_transfer_dialog_add_task(self->priv->file_transfer_dialog,
> > - task);
> > + g_object_ref(task));
> > }
> >
> > static void
>
> Acked-by: Fabiano Fidêncio <fidencio at redhat.com>
Should be added to v4.0-maint branch too
Regards,
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 :|
More information about the virt-tools-list
mailing list