[gnome-control-center] hostname-helper: fall back to kernel hostname when the pretty one is an empty string
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] hostname-helper: fall back to kernel hostname when the pretty one is an empty string
- Date: Thu, 19 Jan 2017 09:47:42 +0000 (UTC)
commit 239403c7427bb1998fce1ce7739e13695fe28937
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Wed Nov 2 17:15:20 2016 +0100
hostname-helper: fall back to kernel hostname when the pretty one is an empty string
The empty string is not too useful as an SSID, an attempt to create a
hotspot fails:
(gnome-control-center:19371): network-cc-panel-WARNING **:
Failed to add new connection: (2)
A 'wireless' setting with a valid SSID is required if no AP path was given.
shell/hostname-helper.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/shell/hostname-helper.c b/shell/hostname-helper.c
index 45baf51..e453f01 100644
--- a/shell/hostname-helper.c
+++ b/shell/hostname-helper.c
@@ -178,7 +178,7 @@ pretty_hostname_to_ssid (const char *pretty)
const char *p, *prev;
char *ret = NULL;
- if (pretty == NULL) {
+ if (pretty == NULL || *pretty == '\0') {
pretty = g_get_host_name ();
if (g_strcmp0 (pretty, "localhost") == 0)
pretty = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]