projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Restore border around terminal to default background colour rather than
[u/mdw/putty]
/
sftp.c
diff --git
a/sftp.c
b/sftp.c
index
4d5172b
..
a55262a
100644
(file)
--- a/
sftp.c
+++ b/
sftp.c
@@
-334,6
+334,14
@@
static struct sftp_request *sftp_alloc_request(void)
return r;
}
return r;
}
+void sftp_cleanup_request(void)
+{
+ if (sftp_requests == NULL) {
+ freetree234(sftp_requests);
+ sftp_requests = NULL;
+ }
+}
+
void sftp_register(struct sftp_request *req)
{
req->registered = 1;
void sftp_register(struct sftp_request *req)
{
req->registered = 1;
@@
-1081,7
+1089,8
@@
int xfer_done(struct fxp_xfer *xfer)
void xfer_download_queue(struct fxp_xfer *xfer)
{
void xfer_download_queue(struct fxp_xfer *xfer)
{
- while (xfer->req_totalsize < xfer->req_maxsize && !xfer->eof) {
+ while (xfer->req_totalsize < xfer->req_maxsize &&
+ !xfer->eof && !xfer->err) {
/*
* Queue a new read request.
*/
/*
* Queue a new read request.
*/
@@
-1147,6
+1156,8
@@
int xfer_download_gotpkt(struct fxp_xfer *xfer, struct sftp_packet *pktin)
#endif
} else if (rr->retlen < 0) {
/* some error other than EOF; signal it back to caller */
#endif
} else if (rr->retlen < 0) {
/* some error other than EOF; signal it back to caller */
+ xfer_set_error(xfer);
+ rr->complete = -1;
return -1;
}
return -1;
}