*
* Connects to the accessibility registry and initializes the SPI.
*
- * Returns: 0 on success, otherwise an integer error code.
+ * Returns: 0 on success, otherwise an integer error code.
**/
int
SPI_init (void)
registry = cspi_init ();
g_atexit (cspi_cleanup);
-
- return 0;
+
+ /* fprintf (stderr, "registry=%x\n", (int) registry); */
+
+ if ((registry != CORBA_OBJECT_NIL) && (cspi_ping (registry)))
+ return 0;
+ else
+ return 2;
}
/**
return NULL;
}
+#ifdef PRINT_LEAKS
static void
report_leaked_ref (gpointer key, gpointer val, gpointer user_data)
{
SPI_freeString (name);
}
-
+#endif
/**
* SPI_exit: