#include <signal.h>
#ifdef HAVE_ORBIT_LINK
-extern GMainLoop *link_loop;
void link_set_tmpdir(const char *dir);
#else
#include <linc/linc.h> /* for linc_main_get_loop() */
GMainLoop *captive_corba_get_loop(void)
{
#ifdef HAVE_ORBIT_LINK
+static GMainLoop *link_loop;
+
+ if (!link_loop)
+ link_loop=g_main_loop_new(g_main_context_default(),TRUE);
return link_loop;
#else
return linc_main_get_loop();
/* CORBA_ORB_run() -> linc_main_loop_run() -> g_main_loop_run()
* and therefore we should be safe with glib events handling.
*/
+#ifdef HAVE_ORBIT_LINK
+ g_main_loop_run(captive_corba_get_loop());
+#else
CORBA_ORB_run(captive_corba_orb,&captive_corba_ev);
g_assert(validate_CORBA_Environment(&captive_corba_ev));
+#endif
/* Shutdown 'Vfs' servant */
Vfs_servant=PortableServer_POA_reference_to_servant(captive_corba_poa,Vfs_object,&captive_corba_ev);