--bwlimit doesn't work for daemon mode
uwe at ohse.de
uwe at ohse.de
Thu Jan 13 09:12:12 GMT 2005
[I'm not subscribed, please CC me on replies]
Some time after 2.6.0 the --bwlimit code was enhanced, but the code now
doesn't work anymore when you set the bandwidth limit for the daemon and
generates error log entries like:
2005/01/13 08:17:03 [29636] rsync: writefd_unbuffered failed to write 12 \
bytes: phase "unknown" [receiver]: Success (0)
2005/01/13 08:17:03 [29636] rsync error: error in rsync protocol data \
stream (code 12) at io.c(909)
Regards, Uwe
--------------------------------------------------------------------------
diff -ur /tmp/rsync-2.6.3/options.c ./options.c
--- /tmp/rsync-2.6.3/options.c 2004-09-23 17:39:05.000000000 +0000
+++ ./options.c 2005-01-13 08:47:09.292810016 +0000
@@ -769,6 +768,12 @@
}
}
+ if (bwlimit) {
+ bwlimit_writemax = (size_t)bwlimit * 128;
+ if (bwlimit_writemax < 512)
+ bwlimit_writemax = 512;
+ }
+
if (daemon_opt) {
daemon_opt = 0;
am_daemon = 1;
@@ -807,11 +812,6 @@
if (do_progress && !verbose)
verbose = 1;
- if (bwlimit) {
- bwlimit_writemax = (size_t)bwlimit * 128;
- if (bwlimit_writemax < 512)
- bwlimit_writemax = 512;
- }
if (inplace) {
More information about the rsync
mailing list