summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f7f2730)
before the deferred command line processing).
Also removed a couple of unused variables.
git-svn-id: svn://svn.tartarus.org/sgt/putty@1994
cda61777-01e9-0310-a592-
d414129be87e
static int preserve = 0;
static int targetshouldbedirectory = 0;
static int statistics = 1;
static int preserve = 0;
static int targetshouldbedirectory = 0;
static int statistics = 1;
-static int portnumber = 0;
static int prev_stats_len = 0;
static int scp_unsafe_mode = 0;
static int prev_stats_len = 0;
static int scp_unsafe_mode = 0;
-static char *password = NULL;
static int errs = 0;
/* GUI Adaptation - Sept 2000 */
#define NAME_STR_MAX 2048
static int errs = 0;
/* GUI Adaptation - Sept 2000 */
#define NAME_STR_MAX 2048
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;
-
/*
* Disable scary things which shouldn't be enabled for simple
* things like SCP and SFTP: agent forwarding, port forwarding,
/*
* Disable scary things which shouldn't be enabled for simple
* things like SCP and SFTP: agent forwarding, port forwarding,