[network-manager-applet] editor: fix InfiniBand editor (MAC address and validation)
- From: Jiří Klimeš <jklimes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] editor: fix InfiniBand editor (MAC address and validation)
- Date: Tue, 10 Mar 2015 16:01:46 +0000 (UTC)
commit f4acf32158d14c3a6949ef4061981ffb36c478a7
Author: Jiří Klimeš <jklimes redhat com>
Date: Tue Mar 10 16:48:10 2015 +0100
editor: fix InfiniBand editor (MAC address and validation)
src/connection-editor/page-infiniband.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/connection-editor/page-infiniband.c b/src/connection-editor/page-infiniband.c
index 6df0078..c225604 100644
--- a/src/connection-editor/page-infiniband.c
+++ b/src/connection-editor/page-infiniband.c
@@ -172,7 +172,7 @@ ui_to_setting (CEPageInfiniband *self)
{
CEPageInfinibandPrivate *priv = CE_PAGE_INFINIBAND_GET_PRIVATE (self);
const char *mode;
- GByteArray *device_mac = NULL;
+ char *device_mac = NULL;
GtkWidget *entry;
/* Transport mode */
@@ -183,8 +183,7 @@ ui_to_setting (CEPageInfiniband *self)
entry = gtk_bin_get_child (GTK_BIN (priv->device_mac));
if (entry)
- device_mac = nm_utils_hwaddr_atoba (gtk_entry_get_text (GTK_ENTRY (entry)),
- ARPHRD_INFINIBAND);
+ device_mac = ce_page_entry_to_mac (GTK_ENTRY (entry), ARPHRD_INFINIBAND, NULL);
g_object_set (priv->setting,
NM_SETTING_INFINIBAND_MAC_ADDRESS, device_mac,
@@ -192,8 +191,7 @@ ui_to_setting (CEPageInfiniband *self)
NM_SETTING_INFINIBAND_TRANSPORT_MODE, mode,
NULL);
- if (device_mac)
- g_byte_array_free (device_mac, TRUE);
+ g_free (device_mac);
}
static gboolean
@@ -214,7 +212,7 @@ validate (CEPage *page, NMConnection *connection, GError **error)
}
ui_to_setting (self);
- return nm_setting_verify (NM_SETTING (priv->setting), NULL, error);
+ return nm_setting_verify (NM_SETTING (priv->setting), connection, error);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]