~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Weaken the assertion in general_textout(). It was failing in the
[sgt/putty]
/
pscp.c
diff --git
a/pscp.c
b/pscp.c
index
5f22828
..
3ef1b33
100644
(file)
--- a/
pscp.c
+++ b/
pscp.c
@@
-180,12
+180,6
@@
int from_backend(void *frontend, int is_stderr, const char *data, int datalen)
return 0;
}
return 0;
}
- /*
- * If this is before the real session begins, just return.
- */
- if (!outptr)
- return 0;
-
if ((outlen > 0) && (len > 0)) {
unsigned used = outlen;
if (used > len)
if ((outlen > 0) && (len > 0)) {
unsigned used = outlen;
if (used > len)
@@
-258,8
+252,14
@@
static int ssh_scp_recv(unsigned char *buf, int len)
static void ssh_scp_init(void)
{
while (!back->sendok(backhandle)) {
static void ssh_scp_init(void)
{
while (!back->sendok(backhandle)) {
- if (ssh_sftp_loop_iteration() < 0)
+ if (back->exitcode(backhandle) >= 0) {
+ errs++;
+ return;
+ }
+ if (ssh_sftp_loop_iteration() < 0) {
+ errs++;
return; /* doom */
return; /* doom */
+ }
}
/* Work out which backend we ended up using. */
}
/* Work out which backend we ended up using. */
@@
-292,7
+292,7
@@
static void bump(char *fmt, ...)
sfree(str2);
errs++;
sfree(str2);
errs++;
- if (back != NULL && back->
socket(backhandle) != NULL
) {
+ if (back != NULL && back->
connected(backhandle)
) {
char ch;
back->special(backhandle, TS_EOF);
ssh_scp_recv((unsigned char *) &ch, 1);
char ch;
back->special(backhandle, TS_EOF);
ssh_scp_recv((unsigned char *) &ch, 1);
@@
-424,6
+424,7
@@
static void do_cmd(char *host, char *user, char *cmd)
cfg.x11_forward = 0;
cfg.agentfwd = 0;
cfg.portfwd[0] = cfg.portfwd[1] = '\0';
cfg.x11_forward = 0;
cfg.agentfwd = 0;
cfg.portfwd[0] = cfg.portfwd[1] = '\0';
+ cfg.ssh_simple = TRUE;
/*
* Set up main and possibly fallback command depending on
/*
* Set up main and possibly fallback command depending on
@@
-472,7
+473,7
@@
static void do_cmd(char *host, char *user, char *cmd)
back->provide_logctx(backhandle, logctx);
console_provide_logctx(logctx);
ssh_scp_init();
back->provide_logctx(backhandle, logctx);
console_provide_logctx(logctx);
ssh_scp_init();
- if (verbose && realhost != NULL)
+ if (verbose && realhost != NULL
&& errs == 0
)
tell_user(stderr, "Connected to %s\n", realhost);
sfree(realhost);
}
tell_user(stderr, "Connected to %s\n", realhost);
sfree(realhost);
}
@@
-2285,7
+2286,7
@@
int psftp_main(int argc, char *argv[])
tolocal(argc, argv);
}
tolocal(argc, argv);
}
- if (back != NULL && back->
socket(backhandle) != NULL
) {
+ if (back != NULL && back->
connected(backhandle)
) {
char ch;
back->special(backhandle, TS_EOF);
ssh_scp_recv((unsigned char *) &ch, 1);
char ch;
back->special(backhandle, TS_EOF);
ssh_scp_recv((unsigned char *) &ch, 1);