Bug 625628 – GDBusProxy: wrong property name sorting
authorDavid Zeuthen <davidz@redhat.com>
Fri, 30 Jul 2010 20:33:29 +0000 (16:33 -0400)
committerDavid Zeuthen <davidz@redhat.com>
Fri, 30 Jul 2010 20:34:13 +0000 (16:34 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=625628

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusproxy.c

index cbb93c3..3898b79 100644 (file)
@@ -539,6 +539,13 @@ g_dbus_proxy_init (GDBusProxy *proxy)
 
 /* ---------------------------------------------------------------------------------------------------- */
 
+static gint
+property_name_sort_func (const gchar **a,
+                         const gchar **b)
+{
+  return g_strcmp0 (*a, *b);
+}
+
 /**
  * g_dbus_proxy_get_cached_property_names:
  * @proxy: A #GDBusProxy.
@@ -569,7 +576,7 @@ g_dbus_proxy_get_cached_property_names (GDBusProxy  *proxy)
   g_hash_table_iter_init (&iter, proxy->priv->properties);
   while (g_hash_table_iter_next (&iter, (gpointer) &key, NULL))
     g_ptr_array_add (p, g_strdup (key));
-  g_ptr_array_sort (p, (GCompareFunc) g_strcmp0);
+  g_ptr_array_sort (p, (GCompareFunc) property_name_sort_func);
   g_ptr_array_add (p, NULL);
 
   names = (gchar **) g_ptr_array_free (p, FALSE);