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

Victor Toso victortoso at redhat.com
Fri Jul 29 12:47:17 UTC 2016


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



More information about the Spice-devel mailing list