[virt-tools-list] [virt-viewer v1] Take reference to monitor the file transfer task

Fabiano Fidêncio fidencio at redhat.com
Tue Jul 12 12:22:54 UTC 2016


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
> --
> 2.7.4
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Acked-by: Fabiano Fidêncio <fidencio at redhat.com>




More information about the virt-tools-list mailing list