wineboot: Don't use ai_canonname for ComputerName if it is "localhost".
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f7668a85d1
commit
ca5a6d07dc
|
@ -826,7 +826,9 @@ static void create_computer_name_keys(void)
|
||||||
|
|
||||||
if (gethostname( buffer, sizeof(buffer) )) return;
|
if (gethostname( buffer, sizeof(buffer) )) return;
|
||||||
hints.ai_flags = AI_CANONNAME;
|
hints.ai_flags = AI_CANONNAME;
|
||||||
if (!getaddrinfo( buffer, NULL, &hints, &res )) name = res->ai_canonname;
|
if (!getaddrinfo( buffer, NULL, &hints, &res ) &&
|
||||||
|
res->ai_canonname && strcasecmp(res->ai_canonname, "localhost") != 0)
|
||||||
|
name = res->ai_canonname;
|
||||||
dot = strchr( name, '.' );
|
dot = strchr( name, '.' );
|
||||||
if (dot) *dot++ = 0;
|
if (dot) *dot++ = 0;
|
||||||
else dot = name + strlen(name);
|
else dot = name + strlen(name);
|
||||||
|
|
Loading…
Reference in New Issue