summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4db4f6a)
gratuitous re-implementation of the "-l user" option.)
git-svn-id: svn://svn.tartarus.org/sgt/putty@1997
cda61777-01e9-0310-a592-
d414129be87e
do_defaults(NULL, &cfg);
strncpy(cfg.host, host, sizeof(cfg.host) - 1);
cfg.host[sizeof(cfg.host) - 1] = '\0';
do_defaults(NULL, &cfg);
strncpy(cfg.host, host, sizeof(cfg.host) - 1);
cfg.host[sizeof(cfg.host) - 1] = '\0';
+ }
+
+ /*
+ * Force use of SSH. (If they got the protocol wrong we assume the
+ * port is useless too.)
+ */
+ if (cfg.protocol != PROT_SSH) {
+ cfg.protocol = PROT_SSH;
+ cfg.port = 22;
- if (cfg.protocol != PROT_SSH)
- cfg.port = 22;
-
if (portnumber)
cfg.port = portnumber;
if (portnumber)
cfg.port = portnumber;
} else if (strcmp(argv[i], "-h") == 0 ||
strcmp(argv[i], "-?") == 0) {
usage();
} else if (strcmp(argv[i], "-h") == 0 ||
strcmp(argv[i], "-?") == 0) {
usage();
- } else if (strcmp(argv[i], "-l") == 0 && i + 1 < argc) {
- user = argv[++i];
} else if (strcmp(argv[i], "-batch") == 0) {
console_batch_mode = 1;
} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {
} else if (strcmp(argv[i], "-batch") == 0) {
console_batch_mode = 1;
} else if (strcmp(argv[i], "-b") == 0 && i + 1 < argc) {