[Spice-devel] [spice-gtk v1] file-transfer: remove unused function for debug

Victor Toso lists at victortoso.com
Fri Jul 29 21:35:14 UTC 2016


Hi,

On Fri, Jul 29, 2016 at 03:56:11PM +0200, Pavel Grunt wrote:
> Ack

Thanks, pushed as 3a91bcfffabfda7667fc560fdc0ac0f2951d0152

> On Fri, 2016-07-29 at 14:47 +0200, Victor Toso wrote:
> > This is here due bad rebase. It was removed and replaced by patch
> > f6072e678ea5 but not removed from 1af22e9652ddcbdd426cd "file-xfer:
> > move to spice-file-transfer-task.c", so the function is there, unused.
> > ---
> >  src/spice-file-transfer-task-priv.h |  1 -
> >  src/spice-file-transfer-task.c      | 15 ---------------
> >  2 files changed, 16 deletions(-)
> > 
> > diff --git a/src/spice-file-transfer-task-priv.h b/src/spice-file-transfer-
> > task-priv.h
> > index df3ea93..1ceb392 100644
> > --- a/src/spice-file-transfer-task-priv.h
> > +++ b/src/spice-file-transfer-task-priv.h
> > @@ -52,7 +52,6 @@ gssize
> > spice_file_transfer_task_read_finish(SpiceFileTransferTask *self,
> >                                              GError **error);
> >  guint64 spice_file_transfer_task_get_file_size(SpiceFileTransferTask *self);
> >  guint64 spice_file_transfer_task_get_bytes_read(SpiceFileTransferTask *self);
> > -void spice_file_transfer_task_debug_info(SpiceFileTransferTask *self);
> >  
> >  G_END_DECLS
> >  
> > diff --git a/src/spice-file-transfer-task.c b/src/spice-file-transfer-task.c
> > index 974b666..23aab62 100644
> > --- a/src/spice-file-transfer-task.c
> > +++ b/src/spice-file-transfer-task.c
> > @@ -464,21 +464,6 @@ gssize
> > spice_file_transfer_task_read_finish(SpiceFileTransferTask *self,
> >      return nbytes;
> >  }
> >  
> > -G_GNUC_INTERNAL
> > -void spice_file_transfer_task_debug_info(SpiceFileTransferTask *self)
> > -{
> > -    const GTimeSpan interval = 20 * G_TIME_SPAN_SECOND;
> > -    gint64 now = g_get_monotonic_time();
> > -
> > -    if (interval < now - self->last_update) {
> > -        gchar *basename = g_file_get_basename(self->file);
> > -        self->last_update = now;
> > -        SPICE_DEBUG("transferred %.2f%% of the file %s",
> > -                    100.0 * self->read_bytes / self->file_size, basename);
> > -        g_free(basename);
> > -    }
> > -}
> > -
> >  /****************************************************************************
> > ***
> >   * External API
> >  
> > ******************************************************************************
> > /
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel


More information about the Spice-devel mailing list