[Spice-commits] src/spice-file-transfer-task.c src/spice-file-transfer-task-priv.h

Victor Toso de Carvalho victortoso at kemper.freedesktop.org
Fri Jul 29 21:34:25 UTC 2016


 src/spice-file-transfer-task-priv.h |    1 -
 src/spice-file-transfer-task.c      |   15 ---------------
 2 files changed, 16 deletions(-)

New commits:
commit 3a91bcfffabfda7667fc560fdc0ac0f2951d0152
Author: Victor Toso <victortoso at redhat.com>
Date:   Fri Jul 29 14:42:19 2016 +0200

    file-transfer: remove unused function for debug
    
    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.
    
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

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
  ******************************************************************************/


More information about the Spice-commits mailing list