[gvfs] [FTP] Don't add random bytes whenever we send a progress notification
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] [FTP] Don't add random bytes whenever we send a progress notification
- Date: Mon, 10 Aug 2009 12:09:14 +0000 (UTC)
commit 9c80d1ea68314ccd3b44d3a6c3761b1e42699953
Author: Benjamin Otte <otte gnome org>
Date: Mon Aug 10 13:59:52 2009 +0200
[FTP] Don't add random bytes whenever we send a progress notification
The code previously did update the write counters after being
interrupted for progress updates. That would cause it to insert a random
byte for every time it sent a progress update from the write loop.
Noticed by Tomas Bzatek - sorry about your mp3s :(
daemon/gvfsbackendftp.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index 94e64ba..5aca1c3 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -1188,15 +1188,15 @@ ftp_output_stream_splice (GOutputStream *output,
current = cancellable;
g_clear_error (error);
progress_callback (bytes_copied, total_size, progress_callback_data);
+ continue;
}
else
{
bytes_copied = -1;
break;
}
+ g_assert_not_reached();
}
- if (n_read == 0)
- break;
p = buffer;
while (n_read > 0)
@@ -1211,12 +1211,14 @@ ftp_output_stream_splice (GOutputStream *output,
current = cancellable;
g_clear_error (error);
progress_callback (bytes_copied, total_size, progress_callback_data);
+ continue;
}
else
{
bytes_copied = -1;
break;
}
+ g_assert_not_reached();
}
p += n_written;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]