diff options
author | Nathan Straz <nstraz@redhat.com> | 2013-08-29 16:47:14 -0400 |
---|---|---|
committer | Nathan Straz <nstraz@redhat.com> | 2013-09-11 17:49:40 -0400 |
commit | 5a8fc22727bc20624dd915f1e6fd805ba5e0f85f (patch) | |
tree | f514e667e0c114b89988a57d41daf5d408abd181 /qarsh_packet.c | |
parent | ceaf5360d969f2507018f51876f64aaae767e367 (diff) | |
download | qarsh-5a8fc22727bc20624dd915f1e6fd805ba5e0f85f.tar.gz qarsh-5a8fc22727bc20624dd915f1e6fd805ba5e0f85f.tar.xz qarsh-5a8fc22727bc20624dd915f1e6fd805ba5e0f85f.zip |
Remove complicated remote file descriptor code
Only handle one file transfer at a time so we don't need
an array to track multiple transfers or know the remote's
fd number.
Loop in recv_packet until we read a whole packet.
Diffstat (limited to 'qarsh_packet.c')
-rw-r--r-- | qarsh_packet.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/qarsh_packet.c b/qarsh_packet.c index 945db6b..d6a45a1 100644 --- a/qarsh_packet.c +++ b/qarsh_packet.c @@ -319,7 +319,6 @@ void parse_qp_sendfile(char *buf, int *buflen, struct qa_packet *qp) { buf = fetch_string(buf, buflen, &(qp->qp_sendfile.qp_path)); - buf = fetch_int(buf, buflen, &(qp->qp_sendfile.qp_remfd)); } void @@ -485,7 +484,6 @@ char * store_qp_sendfile(char *buf, struct qa_packet *qp) { buf = store_string(buf, qp->qp_sendfile.qp_path); - buf = store_int(buf, qp->qp_sendfile.qp_remfd); return buf; } @@ -660,7 +658,7 @@ make_qp_recvfile(const char *path, off_t count, mode_t mode) } struct qa_packet * -make_qp_sendfile(const char *path, int remfd) +make_qp_sendfile(const char *path) { struct qa_packet *qp; qp = malloc(sizeof *qp); @@ -669,7 +667,6 @@ make_qp_sendfile(const char *path, int remfd) qp->qp_type = QP_SENDFILE; qp->qp_sendfile.qp_path = strdup(path); - qp->qp_sendfile.qp_remfd = remfd; return qp; } @@ -852,8 +849,8 @@ dump_qp_recvfile(struct qa_packet *qp) void dump_qp_sendfile(struct qa_packet *qp) { - fprintf(stderr, "path: %s remfd: %d", - qp->qp_sendfile.qp_path, qp->qp_sendfile.qp_remfd); + fprintf(stderr, "path: %s", + qp->qp_sendfile.qp_path); } void |