projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Further correction: on reflection, after examining all the call
[u/mdw/putty]
/
psftp.c
diff --git
a/psftp.c
b/psftp.c
index
2e25d97
..
63446d4
100644
(file)
--- a/
psftp.c
+++ b/
psftp.c
@@
-707,7
+707,7
@@
int sftp_put_file(char *fname, char *outfname, int recurse, int restart)
if (!xfer_done(xfer)) {
pktin = sftp_recv();
ret = xfer_upload_gotpkt(xfer, pktin);
if (!xfer_done(xfer)) {
pktin = sftp_recv();
ret = xfer_upload_gotpkt(xfer, pktin);
- if (
!ret
) {
+ if (
ret <= 0 && !err
) {
printf("error while writing: %s\n", fxp_error());
err = 1;
}
printf("error while writing: %s\n", fxp_error());
err = 1;
}
@@
-2798,6
+2798,8
@@
static int psftp_connect(char *userhost, char *user, int portnumber)
back->provide_logctx(backhandle, logctx);
console_provide_logctx(logctx);
while (!back->sendok(backhandle)) {
back->provide_logctx(backhandle, logctx);
console_provide_logctx(logctx);
while (!back->sendok(backhandle)) {
+ if (back->exitcode(backhandle) >= 0)
+ return 1;
if (ssh_sftp_loop_iteration() < 0) {
fprintf(stderr, "ssh_init: error during SSH connection setup\n");
return 1;
if (ssh_sftp_loop_iteration() < 0) {
fprintf(stderr, "ssh_init: error during SSH connection setup\n");
return 1;