mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-11 08:08:06 -05:00
Use sk_namelookup to get FQDN host name.
It's silly to use the higher-level name_lookup(), because the way in which they differ is that name_lookup() allows DNS lookups to be deferred to the other side of a network proxy over which your connection is travelling - and when you're trying to find out your own host name for use as a database key, there's no _connection_ involved at all, and no potential proxy either.
This commit is contained in:
parent
7663e55526
commit
de78556689
@ -78,8 +78,7 @@ int platform_make_x11_server(Plug *plug, const char *progname, int mindisp,
|
||||
char *hostname = get_hostname();
|
||||
if (hostname) {
|
||||
char *canonicalname = NULL;
|
||||
a_tcp = name_lookup(hostname, tcp_port, &canonicalname,
|
||||
conf, addrtype, NULL, "");
|
||||
a_tcp = sk_namelookup(hostname, &canonicalname, addrtype);
|
||||
sfree(canonicalname);
|
||||
}
|
||||
sfree(hostname);
|
||||
|
Loading…
x
Reference in New Issue
Block a user