projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Put the \001 prefix back on scp error messages when they're sent to
[u/mdw/putty]
/
plink.c
diff --git
a/plink.c
b/plink.c
index
76ed437
..
d493c68
100644
(file)
--- a/
plink.c
+++ b/
plink.c
@@
-88,10
+88,14
@@
void verify_ssh_host_key(char *host, int port, char *keytype,
if (ret == 0) /* success - key matched OK */
return;
if (ret == 0) /* success - key matched OK */
return;
- if (ret == 2)
/* key was different */
+ if (ret == 2)
{
/* key was different */
fprintf(stderr, wrongmsg, fingerprint);
fprintf(stderr, wrongmsg, fingerprint);
- if (ret == 1) /* key was absent */
+ fflush(stderr);
+ }
+ if (ret == 1) { /* key was absent */
fprintf(stderr, absentmsg, fingerprint);
fprintf(stderr, absentmsg, fingerprint);
+ fflush(stderr);
+ }
hin = GetStdHandle(STD_INPUT_HANDLE);
GetConsoleMode(hin, &savemode);
hin = GetStdHandle(STD_INPUT_HANDLE);
GetConsoleMode(hin, &savemode);
@@
-423,8
+427,10
@@
int main(int argc, char **argv) {
strncpy(cfg.host, p, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = default_port;
strncpy(cfg.host, p, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = default_port;
- } else
+ } else
{
cfg = cfg2;
cfg = cfg2;
+ cfg.remote_cmd_ptr = cfg.remote_cmd;
+ }
} else {
*r++ = '\0';
strncpy(cfg.username, p, sizeof(cfg.username)-1);
} else {
*r++ = '\0';
strncpy(cfg.username, p, sizeof(cfg.username)-1);
@@
-566,11
+572,10
@@
int main(int argc, char **argv) {
n = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
if (n == 0) {
WSANETWORKEVENTS things;
n = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
if (n == 0) {
WSANETWORKEVENTS things;
- enum234 e;
SOCKET socket;
SOCKET socket;
- extern SOCKET first_socket(
enum234 *), next_socket(enum234
*);
+ extern SOCKET first_socket(
int *), next_socket(int
*);
extern int select_result(WPARAM, LPARAM);
extern int select_result(WPARAM, LPARAM);
- int i;
+ int i
, socketstate
;
/*
* We must not call select_result() for any socket
/*
* We must not call select_result() for any socket
@@
-580,8
+585,8
@@
int main(int argc, char **argv) {
*/
/* Count the active sockets. */
i = 0;
*/
/* Count the active sockets. */
i = 0;
- for (socket = first_socket(&e); socket != INVALID_SOCKET;
- socket = next_socket(&e))
+ for (socket = first_socket(&
socketstat
e); socket != INVALID_SOCKET;
+ socket = next_socket(&
socketstat
e))
i++;
/* Expand the buffer if necessary. */
i++;
/* Expand the buffer if necessary. */
@@
-592,8
+597,8
@@
int main(int argc, char **argv) {
/* Retrieve the sockets into sklist. */
skcount = 0;
/* Retrieve the sockets into sklist. */
skcount = 0;
- for (socket = first_socket(&e); socket != INVALID_SOCKET;
- socket = next_socket(&e)) {
+ for (socket = first_socket(&
socketstat
e); socket != INVALID_SOCKET;
+ socket = next_socket(&
socketstat
e)) {
sklist[skcount++] = socket;
}
sklist[skcount++] = socket;
}