core: fix Address property type of IP6Config objects
authorDan Williams <dcbw@redhat.com>
Sun, 18 Apr 2010 00:19:30 +0000 (17:19 -0700)
committerDan Williams <dcbw@redhat.com>
Sun, 18 Apr 2010 00:19:30 +0000 (17:19 -0700)
We can change the property's D-Bus signature (and thus API) here
because querying the IP6Config object's properties caused NM to
crash.  Apparently we forgot to change the type of the Address
property when we C&P-ed the IP4Config into the IP6Config, and
DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT is certainly the wrong type
to use since the backing object that dbus-glib would marshal
into the ARRAY_OF_ARRAY_OF_UINT wasn't that type, causing a
crash in dbus-glib when a client got the IP6Config.

introspection/nm-ip6-config.xml
src/nm-ip6-config.c

index d1349b0..6047818 100644 (file)
@@ -2,8 +2,8 @@
 
 <node name="/" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
   <interface name="org.freedesktop.NetworkManager.IP6Config">
-    <property name="Addresses" type="a(ayu)" access="read">
-      <tp:docstring>Tuples of IPv6 address/prefix.</tp:docstring>
+    <property name="Addresses" type="a(ayuay)" access="read">
+      <tp:docstring>Tuples of IPv6 address/prefix/gateway.</tp:docstring>
     </property>
     <property name="Nameservers" type="aay" access="read">
       <tp:docstring>The nameservers in use.</tp:docstring>
index 66c328e..d2a17a0 100644 (file)
@@ -15,7 +15,7 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2005 - 2008 Red Hat, Inc.
+ * Copyright (C) 2005 - 2010 Red Hat, Inc.
  * Copyright (C) 2006 - 2008 Novell, Inc.
  */
 
@@ -697,7 +697,7 @@ nm_ip6_config_class_init (NMIP6ConfigClass *config_class)
                 g_param_spec_boxed (NM_IP6_CONFIG_ADDRESSES,
                                                        "Addresses",
                                                        "IP6 addresses",
-                                                       DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT,
+                                                       DBUS_TYPE_G_ARRAY_OF_IP6_ADDRESS,
                                                        G_PARAM_READABLE));
        g_object_class_install_property
                (object_class, PROP_NAMESERVERS,