Commit ca5a6d07 authored by Jinoh Kang's avatar Jinoh Kang Committed by Alexandre Julliard

wineboot: Don't use ai_canonname for ComputerName if it is "localhost".

parent f7668a85
...@@ -826,7 +826,9 @@ static void create_computer_name_keys(void) ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment