From 147713ef844221d0f47da3f81dab8e8982ba5b4f Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 26 Aug 2011 21:27:06 +0100 Subject: [PATCH] network: Fallback to GNOME as a hotspot name If the hostname of the machine is empty for some reason. --- panels/network/cc-network-panel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panels/network/cc-network-panel.c b/panels/network/cc-network-panel.c index 4474fb56d..f83742689 100644 --- a/panels/network/cc-network-panel.c +++ b/panels/network/cc-network-panel.c @@ -2802,6 +2802,10 @@ get_hostname (void) str = g_strdup (g_get_host_name ()); } + if (str == NULL || *str == '\0') { + str = g_strdup ("GNOME"); + } + return str; }