X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/60860bc3697233687834d4efd4f1fe616f2fb9fb..881da16842e210236b12a040a19bf480de3a5a92:/raw.c diff --git a/raw.c b/raw.c index b4b1108f..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; }