Add a configuration option for TCP keepalives (SO_KEEPALIVE), default off.
[u/mdw/putty] / plink.c
diff --git a/plink.c b/plink.c
index d92b6c6..92769e8 100644 (file)
--- a/plink.c
+++ b/plink.c
@@ -1,5 +1,5 @@
 /*
- * PLink - a command-line (stdin/stdout) variant of PuTTY.
+ * PLink - a Windows command-line (stdin/stdout) variant of PuTTY.
  */
 
 #include <stdio.h>
@@ -210,6 +210,7 @@ static void usage(void)
     printf("Usage: plink [options] [user@]host [command]\n");
     printf("       (\"host\" can also be a PuTTY saved session name)\n");
     printf("Options:\n");
+    printf("  -V        print version information\n");
     printf("  -v        show verbose messages\n");
     printf("  -load sessname  Load settings from saved session\n");
     printf("  -ssh -telnet -rlogin -raw\n");
@@ -233,7 +234,6 @@ static void usage(void)
     printf("  -C        enable compression\n");
     printf("  -i key    private key file for authentication\n");
     printf("  -s        remote command is an SSH subsystem (SSH-2 only)\n");
-    printf("  -V        print version information\n");
     exit(1);
 }
 
@@ -564,7 +564,7 @@ int main(int argc, char **argv)
            (GetFileType(GetStdHandle(STD_INPUT_HANDLE)) == FILE_TYPE_CHAR);
 
        error = back->init(NULL, &backhandle, &cfg, cfg.host, cfg.port,
-                          &realhost, nodelay);
+                          &realhost, nodelay, cfg.tcp_keepalives);
        if (error) {
            fprintf(stderr, "Unable to open connection:\n%s", error);
            return 1;