NetworkManager r4216 - trunk/system-settings/plugins/ifcfg-fedora
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r4216 - trunk/system-settings/plugins/ifcfg-fedora
- Date: Sun, 26 Oct 2008 17:07:13 +0000 (UTC)
Author: dcbw
Date: Sun Oct 26 17:07:13 2008
New Revision: 4216
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4216&view=rev
Log:
Fixes for wired setting accessors patch
Modified:
trunk/system-settings/plugins/ifcfg-fedora/reader.c
Modified: trunk/system-settings/plugins/ifcfg-fedora/reader.c
==============================================================================
--- trunk/system-settings/plugins/ifcfg-fedora/reader.c (original)
+++ trunk/system-settings/plugins/ifcfg-fedora/reader.c Sun Oct 26 17:07:13 2008
@@ -774,6 +774,7 @@
NMSettingWired *s_wired;
char *value;
int mtu;
+ GByteArray *mac = NULL;
s_wired = NM_SETTING_WIRED (nm_setting_wired_new ());
@@ -781,7 +782,7 @@
if (value) {
if (get_int (value, &mtu)) {
if (mtu >= 0 && mtu < 65536)
- s_wired->mtu = mtu;
+ g_object_set (s_wired, NM_SETTING_WIRED_MTU, mtu, NULL);
} else {
/* Shouldn't be fatal... */
PLUGIN_PRINT (IFCFG_PLUGIN_NAME, " warning: invalid MTU '%s'", value);
@@ -789,7 +790,10 @@
g_free (value);
}
- if (!read_mac_address (ifcfg, &s_wired->mac_address, error)) {
+ if (read_mac_address (ifcfg, &mac, error)) {
+ g_object_set (s_wired, NM_SETTING_WIRED_MAC_ADDRESS, mac, NULL);
+ g_byte_array_free (mac, TRUE);
+ } else {
g_object_unref (s_wired);
s_wired = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]