Use `default_port' rather than `22' when loading a default session.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 24 Jan 2001 14:55:48 +0000 (14:55 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 24 Jan 2001 14:55:48 +0000 (14:55 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@896 cda61777-01e9-0310-a592-d414129be87e

plink.c

diff --git a/plink.c b/plink.c
index 6cbc2f6..5efcd45 100644 (file)
--- a/plink.c
+++ b/plink.c
@@ -387,7 +387,7 @@ int main(int argc, char **argv) {
                             /* No settings for this host; use defaults */
                             strncpy(cfg.host, p, sizeof(cfg.host)-1);
                             cfg.host[sizeof(cfg.host)-1] = '\0';
-                            cfg.port = 22;
+                            cfg.port = default_port;
                         } else
                             cfg = cfg2;
                     } else {
@@ -396,7 +396,7 @@ int main(int argc, char **argv) {
                         cfg.username[sizeof(cfg.username)-1] = '\0';
                         strncpy(cfg.host, r, sizeof(cfg.host)-1);
                         cfg.host[sizeof(cfg.host)-1] = '\0';
-                        cfg.port = 22;
+                        cfg.port = default_port;
                     }
                 }
             } else {