diff options
author | Nathan Straz <nstraz@redhat.com> | 2013-09-27 11:42:39 -0400 |
---|---|---|
committer | Nathan Straz <nstraz@redhat.com> | 2013-10-02 14:11:33 -0400 |
commit | 837ff5d713c667f2ea0d111333098dad3175e9b8 (patch) | |
tree | 311caf43e66721deec3c6a87ec6ea04dc2470205 /qacp.c | |
parent | db70c6e59af1634d3734019e6e2e17c95f6c6d97 (diff) | |
download | qarsh-837ff5d713c667f2ea0d111333098dad3175e9b8.tar.gz qarsh-837ff5d713c667f2ea0d111333098dad3175e9b8.tar.xz qarsh-837ff5d713c667f2ea0d111333098dad3175e9b8.zip |
Remove offset from data packet
We really don't need this field since we
always copy data sequentially.
Diffstat (limited to 'qacp.c')
-rw-r--r-- | qacp.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -144,7 +144,6 @@ qacp_sendonefile(const char *host, const char *srcfile, const char *destfile) struct qa_packet *qp; int fd; ssize_t nbytes; - off_t offset; struct stat sb; const int bufsize = QARSH_MAX_PACKET_SIZE/2; char buf[bufsize]; @@ -179,7 +178,6 @@ qacp_sendonefile(const char *host, const char *srcfile, const char *destfile) send_packet(qacp_fd, qp); qpfree(qp); - offset = 0; dallow = 0; complete = 0; for (;;) { @@ -233,11 +231,10 @@ qacp_sendonefile(const char *host, const char *srcfile, const char *destfile) strerror(errno)); qp = make_qp_returncode(-1, errno, strerror(errno)); } else { - qp = make_qp_data(0, offset, nbytes, buf); + qp = make_qp_data(0, nbytes, buf); if (nbytes == 0) { /* Transfer is complete */ complete = 1; } else { - offset += nbytes; dallow -= nbytes; } } |