X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/7aa2715c8d0a828094df89b7ab109a6a7b0070a9..01c034ad857128c51482a563befb374e38ebe668:/plink.c diff --git a/plink.c b/plink.c index ebe5bcc9..d493c686 100644 --- 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 == 2) /* key was different */ + if (ret == 2) { /* key was different */ fprintf(stderr, wrongmsg, fingerprint); - if (ret == 1) /* key was absent */ + fflush(stderr); + } + if (ret == 1) { /* key was absent */ fprintf(stderr, absentmsg, fingerprint); + fflush(stderr); + } hin = GetStdHandle(STD_INPUT_HANDLE); GetConsoleMode(hin, &savemode); @@ -568,11 +572,10 @@ int main(int argc, char **argv) { n = WaitForMultipleObjects(2, handles, FALSE, INFINITE); if (n == 0) { WSANETWORKEVENTS things; - enum234 e; SOCKET socket; - extern SOCKET first_socket(enum234 *), next_socket(enum234 *); + extern SOCKET first_socket(int *), next_socket(int *); extern int select_result(WPARAM, LPARAM); - int i; + int i, socketstate; /* * We must not call select_result() for any socket @@ -582,8 +585,8 @@ int main(int argc, char **argv) { */ /* Count the active sockets. */ i = 0; - for (socket = first_socket(&e); socket != INVALID_SOCKET; - socket = next_socket(&e)) + for (socket = first_socket(&socketstate); socket != INVALID_SOCKET; + socket = next_socket(&socketstate)) i++; /* Expand the buffer if necessary. */ @@ -594,8 +597,8 @@ int main(int argc, char **argv) { /* Retrieve the sockets into sklist. */ skcount = 0; - for (socket = first_socket(&e); socket != INVALID_SOCKET; - socket = next_socket(&e)) { + for (socket = first_socket(&socketstate); socket != INVALID_SOCKET; + socket = next_socket(&socketstate)) { sklist[skcount++] = socket; }