Bugzilla – Attachment 3212 Details for
Bug 2927
scp -l can't limit the bandwidth at the first several seconds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix scp bwlimit calculation.
scp-bwlimit.patch (text/plain), 644 bytes, created by
Darren Tucker
on 2018-12-07 15:02:02 AEDT
(
hide
)
Description:
Fix scp bwlimit calculation.
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2018-12-07 15:02:02 AEDT
Size:
644 bytes
patch
obsolete
>diff --git a/misc.c b/misc.c >index dd74c8d4..aa9a9b0c 100644 >--- a/misc.c >+++ b/misc.c >@@ -1335,7 +1335,7 @@ bandwidth_limit_init(struct bwlimit *bw, u_int64_t kbps, size_t buflen) > { > bw->buflen = buflen; > bw->rate = kbps; >- bw->thresh = bw->rate; >+ bw->thresh = buflen; > bw->lamt = 0; > timerclear(&bw->bwstart); > timerclear(&bw->bwend); >@@ -1348,12 +1348,13 @@ bandwidth_limit(struct bwlimit *bw, size_t read_len) > u_int64_t waitlen; > struct timespec ts, rm; > >+ bw->lamt += read_len; >+ > if (!timerisset(&bw->bwstart)) { > monotime_tv(&bw->bwstart); > return; > } > >- bw->lamt += read_len; > if (bw->lamt < bw->thresh) > return; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
djm
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2927
: 3212