[gnome-control-center] network: Fix warning when BSSID is empty



commit 9d4800b5b263cdab4c6f6eb76e2c6aaec5b47176
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jun 7 17:26:41 2016 +0200

    network: Fix warning when BSSID is empty
    
    libnm-CRITICAL **: _nm_utils_hwaddr_to_dbus: assertion 'len > 0 && len
    <= NM_UTILS_HWADDR_LEN_MAX' failed

 panels/network/connection-editor/ce-page-wifi.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/panels/network/connection-editor/ce-page-wifi.c b/panels/network/connection-editor/ce-page-wifi.c
index d08a3ea..71845e7 100644
--- a/panels/network/connection-editor/ce-page-wifi.c
+++ b/panels/network/connection-editor/ce-page-wifi.c
@@ -141,6 +141,8 @@ ui_to_setting (CEPageWifi *page)
         }
         entry = gtk_bin_get_child (GTK_BIN (gtk_builder_get_object (CE_PAGE (page)->builder, 
"combo_bssid")));
         bssid = gtk_entry_get_text (GTK_ENTRY (entry));
+        if (*bssid == '\0')
+                bssid = NULL;
         entry = gtk_bin_get_child (GTK_BIN (gtk_builder_get_object (CE_PAGE (page)->builder, "combo_mac")));
         device_mac = ce_page_trim_address (gtk_entry_get_text (GTK_ENTRY (entry)));
         entry = GTK_WIDGET (gtk_builder_get_object (CE_PAGE (page)->builder, "entry_cloned_mac"));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]