X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/9e164d82c8990d3c8cff58d866fb9938907d4d7b..ecb2572233d5f3d3523a46979077ac0c20044d58:/raw.c diff --git a/raw.c b/raw.c index 49ca1ce2..b2676a93 100644 --- a/raw.c +++ b/raw.c @@ -139,6 +139,22 @@ static const char *raw_init(void *frontend_handle, void **backend_handle, if ((err = sk_socket_error(raw->s)) != NULL) return err; + if (*cfg->loghost) { + char *colon; + + sfree(*realhost); + *realhost = dupstr(cfg->loghost); + colon = strrchr(*realhost, ':'); + if (colon) { + /* + * FIXME: if we ever update this aspect of ssh.c for + * IPv6 literal management, this should change in line + * with it. + */ + *colon++ = '\0'; + } + } + return NULL; } @@ -280,5 +296,5 @@ Backend raw_backend = { raw_cfg_info, "raw", PROT_RAW, - 1 + 0 };