]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Set cfg.ssh_simple if there are no forwardings.
authorBen Harris <bjh21@bjh21.me.uk>
Sun, 30 Sep 2007 14:14:29 +0000 (14:14 +0000)
committerBen Harris <bjh21@bjh21.me.uk>
Sun, 30 Sep 2007 14:14:29 +0000 (14:14 +0000)
[originally from svn r7750]

unix/uxplink.c

index 9d5f001615b7a200919c8e05642f30f2bd622aa2..9867df2e97f5cfb5c2ef55dc7bf748dea3094312 100644 (file)
@@ -872,6 +872,14 @@ int main(int argc, char **argv)
     sk_init();
     uxsel_init();
 
+    /*
+     * Unix Plink doesn't provide any way to add forwardings after the
+     * connection is set up, so if there are none now, we can safely set
+     * the "simple" flag.
+     */
+    if (cfg.protocol == PROT_SSH && !cfg.x11_forward &&        !cfg.agentfwd &&
+       cfg.portfwd[0] == '\0' && cfg.portfwd[1] == '\0')
+       cfg.ssh_simple = TRUE;
     /*
      * Start up the connection.
      */