X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/39934deb5202149f98198c111a35c21cb4d0d0f8..8154b6022bd42b4aba03fc9adcbabd4f588b6575:/windows/winplink.c diff --git a/windows/winplink.c b/windows/winplink.c index 497ac927..9fca63c1 100644 --- a/windows/winplink.c +++ b/windows/winplink.c @@ -217,7 +217,6 @@ static void usage(void) printf(" force use of a particular protocol\n"); printf(" -P port connect to specified port\n"); printf(" -l user connect with specified username\n"); - printf(" -m file read remote command(s) from file\n"); printf(" -batch disable all interactive prompts\n"); printf("The following options only apply to SSH connections:\n"); printf(" -pw passw login with specified password\n"); @@ -231,8 +230,10 @@ static void usage(void) printf(" -A -a enable / disable agent forwarding\n"); printf(" -t -T enable / disable pty allocation\n"); printf(" -1 -2 force use of particular protocol version\n"); + printf(" -4 -6 force use of IPv4 or IPv6\n"); printf(" -C enable compression\n"); printf(" -i key private key file for authentication\n"); + printf(" -m file read remote command(s) from file\n"); printf(" -s remote command is an SSH subsystem (SSH-2 only)\n"); printf(" -N don't start a shell/command (SSH-2 only)\n"); exit(1); @@ -270,7 +271,7 @@ int main(int argc, char **argv) HANDLE handles[4]; DWORD in_threadid, out_threadid, err_threadid; struct input_data idata; - int reading; + int reading = FALSE; int sending; int portnumber = -1; SOCKET *sklist; @@ -424,8 +425,6 @@ int main(int argc, char **argv) cfg.port = default_port; } else { cfg = cfg2; - /* Ick: patch up internal pointer after copy */ - cfg.remote_cmd_ptr = cfg.remote_cmd; } } @@ -528,7 +527,7 @@ int main(int argc, char **argv) cfg.host[p1] = '\0'; } - if (!*cfg.remote_cmd_ptr) + if (!cfg.remote_cmd_ptr && !*cfg.remote_cmd) flags |= FLAG_INTERACTIVE; /* @@ -663,6 +662,7 @@ int main(int argc, char **argv) cleanup_exit(1); } sending = TRUE; + reading = TRUE; } if (run_timers(now, &next)) {