+2002-06-20 Bill Haneman <bill.haneman@sun.com>
+
+ * cspi/spi_main.c: [fix for bug 85980]
+ (cspi_object_ref):
+ Replaced use of bonobo_object_dup_ref with call to the wrapper
+ method, csou_dup_ref (); this silences a compiler warning and
+ provided more portability.
+ (cspi_registry):
+ Ping the registry before return, and restart if necessary.
+
+ * cspi/bonobo/cspi-bonobo.c:
+ (cspi_ping):
+ New internal method.
+ (cspi_dup_ref):
+ Fixed this method to return an object reference, as it should have
+ all along.
+
+ * cspi/cspi-lowlevel.h:
+ Added internal definition for cspi_ping() and fixed
+ return type of cspi_dup_ref().
+
+
2002-06-19 Bill Haneman <bill.haneman@sun.com>
- * atk-bridge/bridge.c: [partial fix for bug 85305]
+ * atk-bridge/bridge.c: [fix for bug 85305]
(spi_atk_bridge_register_application):
New method where the initial application registry calls have been
moved; it allows an application to re-register in response to
#include <libbonobo.h>
#include "../cspi-lowlevel.h"
-void
+CORBA_Object
cspi_dup_ref (CORBA_Object object)
{
- bonobo_object_dup_ref (object, NULL);
+ return bonobo_object_dup_ref (object, NULL);
}
void
return registry;
}
+SPIBoolean
+cspi_ping (CORBA_Object object)
+{
+ return bonobo_unknown_ping (object, NULL);
+}
+
void
cspi_main (void)
{
/* Misc CORBA / bonobo bits */
SPIBoolean cspi_check_ev (const char *error_string);
-void cspi_dup_ref (CORBA_Object object);
+CORBA_Object cspi_dup_ref (CORBA_Object object);
void cspi_release_unref (CORBA_Object object);
char *cspi_exception_get_text (void);
CORBA_Object cspi_init (void);
+SPIBoolean cspi_ping (CORBA_Object object);
void cspi_main (void);
void cspi_main_quit (void);
CORBA_Environment *
cspi_ev (void)
{
- /* This method is an ugly hack */
return &ev;
}
Accessibility_Registry
cspi_registry (void)
{
+ if (!cspi_ping (registry))
+ registry = cspi_init ();
return registry;
}
g_return_if_fail (accessible != NULL);
if (g_hash_table_lookup (cspi_get_live_refs (), accessible->objref) == NULL) {
- accessible->objref = bonobo_object_dup_ref (accessible->objref, cspi_ev ());
- g_hash_table_insert (cspi_get_live_refs (), accessible->objref, accessible);
+ accessible->objref = cspi_dup_ref (accessible->objref);
+ g_hash_table_insert (cspi_get_live_refs (), accessible->objref, accessible);
} else {
accessible->ref_count++;
}