Differences From Artifact [595f4425f2]:
- File scp.c — part of check-in [a2baae931e] at 2000-10-23 05:32:37 on branch trunk — Created a shiny new abstraction for the socket handling. Has many advantages: - protocol modules can call sk_write() without having to worry about writes blocking, because blocking writes are handled in the abstraction layer and retried later. - `Lost connection while sending' is a thing of the past. - <winsock.h> is no longer needed in most modules, because "putty.h" doesn't have to declare `SOCKET' variables any more, only the abstracted `Socket' type. - select()-equivalent between multiple sockets will now be handled sensibly, which opens the way for things like SSH port forwarding. (user: simon size: 30854)
To Artifact [cc6039617f]:
- File scp.c — part of check-in [05ecf49826] at 2000-10-23 07:20:53 on branch trunk — Plink and PSCP were failing to load the `Default Settings' options when connecting to an arbitrary hostname. In particular, setting a default user name didn't work. Now it does. (user: simon size: 30887)
| ︙ | ︙ | |||
440 441 442 443 444 445 446 447 448 449 450 451 452 453 |
if (host == NULL || host[0] == '\0')
bump("Empty host name");
/* Try to load settings for this host */
do_defaults(host, &cfg);
if (cfg.host[0] == '\0') {
/* No settings for this host; use defaults */
strncpy(cfg.host, host, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = 22;
}
/* Set username */
if (user != NULL && user[0] != '\0') {
| > | 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
if (host == NULL || host[0] == '\0')
bump("Empty host name");
/* Try to load settings for this host */
do_defaults(host, &cfg);
if (cfg.host[0] == '\0') {
/* No settings for this host; use defaults */
do_defaults(NULL, &cfg);
strncpy(cfg.host, host, sizeof(cfg.host)-1);
cfg.host[sizeof(cfg.host)-1] = '\0';
cfg.port = 22;
}
/* Set username */
if (user != NULL && user[0] != '\0') {
|
| ︙ | ︙ |