Blame SOURCES/0002-hostname-helper-fall-back-to-kernel-hostname-when-th.patch

57bc60
From a80bb954e0f4809be57c95041051bb359bc98085 Mon Sep 17 00:00:00 2001
57bc60
From: Lubomir Rintel <lkundrak@v3.sk>
57bc60
Date: Wed, 2 Nov 2016 17:15:20 +0100
57bc60
Subject: [PATCH 2/3] hostname-helper: fall back to kernel hostname when the
57bc60
 pretty one is an empty string
57bc60
57bc60
The empty string is not too useful as an SSID, an attempt to create a
57bc60
hotspot fails:
57bc60
57bc60
  (gnome-control-center:19371): network-cc-panel-WARNING **:
57bc60
    Failed to add new connection: (2)
57bc60
    A 'wireless' setting with a valid SSID is required if no AP path was given.
57bc60
---
57bc60
 shell/hostname-helper.c | 2 +-
57bc60
 1 file changed, 1 insertion(+), 1 deletion(-)
57bc60
57bc60
diff --git a/shell/hostname-helper.c b/shell/hostname-helper.c
57bc60
index ab889b96b..1a063b5cd 100644
57bc60
--- a/shell/hostname-helper.c
57bc60
+++ b/shell/hostname-helper.c
57bc60
@@ -178,7 +178,7 @@ pretty_hostname_to_ssid (const char *pretty)
57bc60
 	const char *p, *prev;
57bc60
 	char *ret = NULL;
57bc60
 
57bc60
-	if (pretty == NULL) {
57bc60
+	if (pretty == NULL || *pretty == '\0') {
57bc60
 		pretty = g_get_host_name ();
57bc60
 		if (g_strcmp0 (pretty, "localhost") == 0)
57bc60
 			pretty = NULL;
57bc60
-- 
57bc60
2.12.2
57bc60