Commit 239403c7 authored by Lubomir Rintel's avatar Lubomir Rintel

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.
parent 691f00b1
......@@ -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;
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