Bugzilla – Attachment 2275 Details for
Bug 2108
sftp progress meter updates too early
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
update sftp upload progress only when acks are received
sftp-better-progress.patch (text/plain), 1000 bytes, created by
Colin Watson
on 2013-05-25 08:03:03 AEST
(
hide
)
Description:
update sftp upload progress only when acks are received
Filename:
MIME Type:
Creator:
Colin Watson
Created:
2013-05-25 08:03:03 AEST
Size:
1000 bytes
patch
obsolete
>=== modified file 'sftp-client.c' >--- sftp-client.c 2012-07-02 12:15:38 +0000 >+++ sftp-client.c 2013-05-24 21:59:56 +0000 >@@ -1340,7 +1340,7 @@ do_upload(struct sftp_conn *conn, char * > int local_fd; > int status = SSH2_FX_OK; > u_int handle_len, id, type; >- off_t offset; >+ off_t offset, progress_counter; > char *handle, *data; > Buffer msg; > struct stat sb; >@@ -1408,9 +1408,10 @@ do_upload(struct sftp_conn *conn, char * > data = xmalloc(conn->transfer_buflen); > > /* Read from local and write to remote */ >- offset = 0; >+ offset = progress_counter = 0; > if (showprogress) >- start_progress_meter(local_path, sb.st_size, &offset); >+ start_progress_meter(local_path, sb.st_size, >+ &progress_counter); > > for (;;) { > int len; >@@ -1481,6 +1482,7 @@ do_upload(struct sftp_conn *conn, char * > debug3("In write loop, ack for %u %u bytes at %lld", > ack->id, ack->len, (long long)ack->offset); > ++ackid; >+ progress_counter += ack->len; > xfree(ack); > } > offset += len; >
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:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2108
: 2275