Use "localhost" as fallback for g_get_host_name(), not "unknown".

2005-08-11  Tor Lillqvist  <tml@novell.com>

	* glib/gutils.c (g_get_any_init): Use "localhost" as fallback for
	g_get_host_name(), not "unknown".
This commit is contained in:
Tor Lillqvist
2005-08-10 21:13:29 +00:00
committed by Tor Lillqvist
parent 29e635059f
commit 535939a144
5 changed files with 23 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
2005-08-11 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_get_any_init): Use "localhost" as fallback for
g_get_host_name(), not "unknown".
2005-08-10 Stepan Kasal <kasal@ucw.cz> 2005-08-10 Stepan Kasal <kasal@ucw.cz>
Fix typos: Invokation --> Invocation (in various places) Fix typos: Invokation --> Invocation (in various places)

View File

@@ -1,3 +1,8 @@
2005-08-11 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_get_any_init): Use "localhost" as fallback for
g_get_host_name(), not "unknown".
2005-08-10 Stepan Kasal <kasal@ucw.cz> 2005-08-10 Stepan Kasal <kasal@ucw.cz>
Fix typos: Invokation --> Invocation (in various places) Fix typos: Invokation --> Invocation (in various places)

View File

@@ -1,3 +1,8 @@
2005-08-11 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_get_any_init): Use "localhost" as fallback for
g_get_host_name(), not "unknown".
2005-08-10 Stepan Kasal <kasal@ucw.cz> 2005-08-10 Stepan Kasal <kasal@ucw.cz>
Fix typos: Invokation --> Invocation (in various places) Fix typos: Invokation --> Invocation (in various places)

View File

@@ -1,3 +1,8 @@
2005-08-11 Tor Lillqvist <tml@novell.com>
* glib/gutils.c (g_get_any_init): Use "localhost" as fallback for
g_get_host_name(), not "unknown".
2005-08-10 Stepan Kasal <kasal@ucw.cz> 2005-08-10 Stepan Kasal <kasal@ucw.cz>
Fix typos: Invokation --> Invocation (in various places) Fix typos: Invokation --> Invocation (in various places)

View File

@@ -1657,7 +1657,7 @@ g_get_any_init (void)
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
if (gethostname (hostname, sizeof (hostname)) == -1) if (gethostname (hostname, sizeof (hostname)) == -1)
g_host_name = g_strdup ("unknown"); g_host_name = g_strdup ("localhost");
else else
g_host_name = g_strdup (hostname); g_host_name = g_strdup (hostname);
#else #else
@@ -1665,7 +1665,7 @@ g_get_any_init (void)
DWORD size = sizeof (hostname); DWORD size = sizeof (hostname);
if (!GetComputerName (hostname, &size)) if (!GetComputerName (hostname, &size))
g_host_name = g_strdup ("unknown"); g_host_name = g_strdup ("localhost");
else else
g_host_name = g_strdup (hostname); g_host_name = g_strdup (hostname);
} }
@@ -1795,7 +1795,7 @@ g_get_tmp_dir (void)
* of the machine is changed while an application is running, the * of the machine is changed while an application is running, the
* return value from this function does not change. The returned * return value from this function does not change. The returned
* string is owned by GLib and should not be modified or freed. If no * string is owned by GLib and should not be modified or freed. If no
* name can be determined, a default fixed string "unknown" is * name can be determined, a default fixed string "localhost" is
* returned. * returned.
* *
* Returns: the host name of the machine. * Returns: the host name of the machine.