sftp_register(req = fxp_opendir_send(dirname));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- dirh = fxp_opendir_recv(pktin);
+ dirh = fxp_opendir_recv(pktin, rreq);
if (dirh == NULL) {
printf("Unable to open %s: %s\n", dirname, fxp_error());
sftp_register(req = fxp_readdir_send(dirh));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- names = fxp_readdir_recv(pktin);
+ names = fxp_readdir_recv(pktin, rreq);
if (names == NULL) {
if (fxp_error_type() == SSH_FX_EOF)
sftp_register(req = fxp_close_send(dirh));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- fxp_close_recv(pktin);
+ fxp_close_recv(pktin, rreq);
/*
* Now we have our filenames. Sort them by actual file
sftp_register(req = fxp_stat_send(target));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- ret = fxp_stat_recv(pktin, &attrs);
+ ret = fxp_stat_recv(pktin, rreq, &attrs);
if (!ret || !(attrs.flags & SSH_FILEXFER_ATTR_PERMISSIONS))
scp_sftp_targetisdir = 0;
SSH_FXF_CREAT | SSH_FXF_TRUNC));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- scp_sftp_filehandle = fxp_open_recv(pktin);
+ scp_sftp_filehandle = fxp_open_recv(pktin, rreq);
if (!scp_sftp_filehandle) {
tell_user(stderr, "pscp: unable to open %s: %s",
data, scp_sftp_fileoffset, len));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- ret = fxp_write_recv(pktin);
+ ret = fxp_write_recv(pktin, rreq);
if (!ret) {
tell_user(stderr, "error while writing: %s\n", fxp_error());
sftp_register(req = fxp_fsetstat_send(scp_sftp_filehandle, attrs));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- ret = fxp_fsetstat_recv(pktin);
+ ret = fxp_fsetstat_recv(pktin, rreq);
if (!ret) {
tell_user(stderr, "unable to set file times: %s\n", fxp_error());
errs++;
sftp_register(req = fxp_close_send(scp_sftp_filehandle));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- fxp_close_recv(pktin);
+ fxp_close_recv(pktin, rreq);
scp_has_times = 0;
return 0;
} else {
sftp_register(req = fxp_mkdir_send(fullname));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- ret = fxp_mkdir_recv(pktin);
+ ret = fxp_mkdir_recv(pktin, rreq);
if (!ret)
err = fxp_error();
sftp_register(req = fxp_stat_send(fullname));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- ret = fxp_stat_recv(pktin, &attrs);
+ ret = fxp_stat_recv(pktin, rreq, &attrs);
if (!ret || !(attrs.flags & SSH_FILEXFER_ATTR_PERMISSIONS) ||
!(attrs.permissions & 0040000)) {
sftp_register(req = fxp_stat_send(fname));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- ret = fxp_stat_recv(pktin, &attrs);
+ ret = fxp_stat_recv(pktin, rreq, &attrs);
if (!ret || !(attrs.flags & SSH_FILEXFER_ATTR_PERMISSIONS)) {
tell_user(stderr, "unable to identify %s: %s", fname,
sftp_register(req = fxp_opendir_send(fname));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- dirhandle = fxp_opendir_recv(pktin);
+ dirhandle = fxp_opendir_recv(pktin, rreq);
if (!dirhandle) {
tell_user(stderr, "scp: unable to open directory %s: %s",
sftp_register(req = fxp_readdir_send(dirhandle));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- names = fxp_readdir_recv(pktin);
+ names = fxp_readdir_recv(pktin, rreq);
if (names == NULL) {
if (fxp_error_type() == SSH_FX_EOF)
sftp_register(req = fxp_close_send(dirhandle));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- fxp_close_recv(pktin);
+ fxp_close_recv(pktin, rreq);
newitem = snew(struct scp_sftp_dirstack);
newitem->next = scp_sftp_dirstack_head;
sftp_register(req = fxp_open_send(scp_sftp_currentname, SSH_FXF_READ));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- scp_sftp_filehandle = fxp_open_recv(pktin);
+ scp_sftp_filehandle = fxp_open_recv(pktin, rreq);
if (!scp_sftp_filehandle) {
tell_user(stderr, "pscp: unable to open %s: %s",
scp_sftp_fileoffset, len));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- actuallen = fxp_read_recv(pktin, data, len);
+ actuallen = fxp_read_recv(pktin, rreq, data, len);
if (actuallen == -1 && fxp_error_type() != SSH_FX_EOF) {
tell_user(stderr, "pscp: error while reading: %s", fxp_error());
sftp_register(req = fxp_close_send(scp_sftp_filehandle));
rreq = sftp_find_request(pktin = sftp_recv());
assert(rreq == req);
- fxp_close_recv(pktin);
+ fxp_close_recv(pktin, rreq);
return 0;
} else {
back->send(backhandle, "", 1);