]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - psftp.c
uxpgnt: fix an uninitialised structure field in find_key().
[PuTTY.git] / psftp.c
diff --git a/psftp.c b/psftp.c
index d35b8fa3c305c31321ed3c526e5d11acd810d3d0..09309a79f4d47dfe5946353b2bc5ed90efb6d22d 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -2657,6 +2657,8 @@ static void usage(void)
     printf("  -hostkey aa:bb:cc:...\n");
     printf("            manually specify a host key (may be repeated)\n");
     printf("  -batch    disable all interactive prompts\n");
+    printf("  -proxycmd command\n");
+    printf("            use 'command' as local proxy\n");
     printf("  -sshlog file\n");
     printf("  -sshrawlog file\n");
     printf("            log protocol details to a file\n");
@@ -2665,7 +2667,9 @@ static void usage(void)
 
 static void version(void)
 {
-  printf("psftp: %s\n", ver);
+  char *buildinfo_text = buildinfo("\n");
+  printf("psftp: %s\n%s\n", ver, buildinfo_text);
+  sfree(buildinfo_text);
   cleanup_exit(1);
 }
 
@@ -2835,6 +2839,11 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
 
     back = &ssh_backend;
 
+    logctx = log_init(NULL, conf);
+    console_provide_logctx(logctx);
+
+    platform_psftp_pre_conn_setup();
+
     err = back->init(NULL, &backhandle, conf,
                     conf_get_str(conf, CONF_host),
                     conf_get_int(conf, CONF_port),
@@ -2844,9 +2853,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
        fprintf(stderr, "ssh_init: %s\n", err);
        return 1;
     }
-    logctx = log_init(NULL, conf);
     back->provide_logctx(backhandle, logctx);
-    console_provide_logctx(logctx);
     while (!back->sendok(backhandle)) {
        if (back->exitcode(backhandle) >= 0)
            return 1;
@@ -2951,8 +2958,6 @@ int psftp_main(int argc, char *argv[])
     argv += i;
     back = NULL;
 
-    platform_psftp_post_option_setup();
-
     /*
      * If the loaded session provides a hostname, and a hostname has not
      * otherwise been specified, pop it in `userhost' so that