2008-12-13 Mike Gorse <mgorse@novell.com>
authorMike Gorse <mgorse@boston.site>
Sun, 14 Dec 2008 00:37:44 +0000 (18:37 -0600)
committerMike Gorse <mgorse@boston.site>
Sun, 14 Dec 2008 00:37:44 +0000 (18:37 -0600)
* atk-adaptor/atk-dbus.c: Have assign-reference return a value.

* atk-adaptor/tree.c: Fix insertion of object path in additions.

* cspi/spi-main.c: Avoid cslling g_object_unref on a null state cache.

* cspi/spi-main.c: Expect register/deregister app to be method calls.

atk-adaptor/atk-dbus.c
atk-adaptor/tree.c
cspi/spi-main.c

index 94b8a8a..f444918 100644 (file)
@@ -94,6 +94,7 @@ assign_reference(void)
   /* Reference of 0 not allowed as used as direct key in hash table */
   if (counter == 0)
     counter++;
+    return counter;
 }
 
 /*---------------------------------------------------------------------------*/
index 4a256a9..639d519 100644 (file)
@@ -67,7 +67,7 @@ append_accessible(gpointer ref, gpointer obj_data, gpointer iter)
       AtkObject *parent;
       gchar *path, *path_parent;
 
-      path = atk_dbus_get_path_from_ref(GPOINTER_TO_INT(ref));
+      path = atk_dbus_get_path (obj_data);
       dbus_message_iter_append_basic (&iter_struct, DBUS_TYPE_OBJECT_PATH, &path);
 
       parent = atk_object_get_parent(obj);
index f5ee42b..87c1d7f 100644 (file)
@@ -219,7 +219,8 @@ cspi_object_unref_internal (Accessible *accessible, gboolean defunct)
     {
       g_free (accessible->v.path);
     }
-    spi_state_set_cache_unref (accessible->states);
+    if (accessible->states)
+      spi_state_set_cache_unref (accessible->states);
     g_free (accessible->description);
     g_free (accessible->name);
     g_free(accessible);
@@ -644,11 +645,11 @@ cspi_dbus_filter (DBusConnection *bus, DBusMessage *message, void *data)
   {
     return cspi_dbus_handle_update_tree (bus, message, data);
   }
-  if (dbus_message_is_signal (message, spi_interface_registry, "registerApplication"))
+  if (dbus_message_is_method_call (message, spi_interface_registry, "registerApplication"))
   {
     return cspi_dbus_handle_register_application (bus, message, data);
   }
-  if (dbus_message_is_signal (message, spi_interface_registry, "deregisterApplication"))
+  if (dbus_message_is_method_call (message, spi_interface_registry, "deregisterApplication"))
   {
     return cspi_dbus_handle_deregister_application (bus, message, data);
   }
@@ -694,7 +695,7 @@ SPI_init (void)
   dbus_error_init (&error);
   dbus_bus_add_match (bus, match, &error);
   g_free (match);
-  match = g_strdup_printf ("type='signal',interface='%s'", spi_interface_registry);
+  match = g_strdup_printf ("type='method_call',interface='%s'", spi_interface_registry);
   dbus_bus_add_match (bus, match, &error);
   g_free (match);
   return 0;