No longer use 'GMainLoop *link_loop;' ORBit2/linc2/link private reference.
authorshort <>
Wed, 5 Nov 2003 14:04:24 +0000 (14:04 +0000)
committershort <>
Wed, 5 Nov 2003 14:04:24 +0000 (14:04 +0000)
 - Suggested by Michael Meeks.

src/libcaptive/sandbox/split.c

index c7cfefd..9af2f3a 100644 (file)
@@ -39,7 +39,6 @@
 #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() */
@@ -177,6 +176,10 @@ void sandbox_child_prepare_shutdown(void)
 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();
@@ -324,8 +327,12 @@ const gchar *socketname=NULL,*socketpathname;
        /* 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);