10139N/Adiff -ur ORBit2-2.14.18-old/include/orbit/GIOP/giop.h ORBit2-2.14.18-new/include/orbit/GIOP/giop.h
10139N/A--- ORBit2-2.14.18-old/include/orbit/GIOP/giop.h 2009-04-18 20:20:54.000000000 +0800
10139N/A+++ ORBit2-2.14.18-new/include/orbit/GIOP/giop.h 2010-05-28 14:35:56.012926304 +0800
12184N/A@@ -14,6 +14,7 @@
10139N/A
10139N/A #ifdef ORBIT2_INTERNAL_API
10139N/A
10139N/A+void giop_set_main_context (GMainContext *context);
10139N/A void giop_init (gboolean thread_safe,
10139N/A gboolean blank_wire_data);
10139N/A void giop_main_run (void);
10139N/Adiff -ur ORBit2-2.14.18-old/include/orbit/orb-core/corba-orb.h ORBit2-2.14.18-new/include/orbit/orb-core/corba-orb.h
10139N/A--- ORBit2-2.14.18-old/include/orbit/orb-core/corba-orb.h 2009-04-18 20:20:54.000000000 +0800
10139N/A+++ ORBit2-2.14.18-new/include/orbit/orb-core/corba-orb.h 2010-05-28 14:36:31.612946110 +0800
13643N/A@@ -32,6 +32,8 @@
10139N/A */
10139N/A glong ORBit_get_giop_recv_limit (void);
10139N/A
10139N/A+void ORBit_set_giop_main_context (GMainContext *context);
13461N/A+
10139N/A #ifdef ORBIT2_INTERNAL_API
12773N/A
12773N/A void ORBit_ORB_forw_bind (CORBA_ORB orb,
12773N/Adiff -ur ORBit2-2.14.18-old/src/orb/GIOP/giop.c ORBit2-2.14.18-new/src/orb/GIOP/giop.c
10139N/A--- ORBit2-2.14.18-old/src/orb/GIOP/giop.c 2009-04-18 20:20:54.000000000 +0800
10139N/A+++ ORBit2-2.14.18-new/src/orb/GIOP/giop.c 2010-05-28 14:34:39.517566265 +0800
10139N/A@@ -21,6 +21,7 @@
10139N/A static int corba_wakeup_fds[2];
10139N/A #define WAKEUP_POLL corba_wakeup_fds [0]
10139N/A #define WAKEUP_WRITE corba_wakeup_fds [1]
10139N/A+static GMainContext *giop_main_context = NULL;
10139N/A static GSource *giop_main_source = NULL;
10139N/A static GIOPThread *giop_main_thread = NULL;
10139N/A
10139N/A@@ -530,19 +531,26 @@
10139N/A }
10139N/A
10139N/A void
10139N/A+giop_set_main_context (GMainContext *context)
10139N/A+{
10139N/A+ giop_main_context = context;
10139N/A+}
10139N/A+
10139N/A+void
10139N/A giop_init (gboolean thread_safe, gboolean blank_wire_data)
10139N/A {
10139N/A link_init (thread_safe);
10139N/A
10139N/A if (giop_thread_safe ()) {
10139N/A GIOPThread *tdata;
10139N/A+ if (!giop_main_context)
10139N/A+ giop_main_context = g_main_context_default();
10139N/A
10139N/A /* We need a destructor to clean up if giopthreads are used
10139N/A * outside of ORBit controlled threads */
10139N/A giop_tdata_private = g_private_new ((GDestroyNotify)giop_thread_free);
10139N/A
10139N/A- giop_main_thread = tdata = giop_thread_new (
10139N/A- g_main_context_default ()); /* main thread */
10139N/A+ giop_main_thread = tdata = giop_thread_new (giop_main_context); /* main thread */
10504N/A
10139N/A if (link_pipe (corba_wakeup_fds) < 0) /* cf. g_main_context_init_pipe */
10139N/A g_error ("Can't create CORBA main-thread wakeup pipe");
10139N/A@@ -556,7 +564,7 @@
10139N/A fcntl (WAKEUP_WRITE, F_SETFL, O_NONBLOCK);
10139N/A #endif
10139N/A giop_main_source = link_source_create_watch (
10139N/A- g_main_context_default (), WAKEUP_POLL,
10139N/A+ giop_main_context, WAKEUP_POLL,
10139N/A NULL, (G_IO_IN | G_IO_PRI),
10139N/A giop_mainloop_handle_input, NULL);
10139N/A
10139N/Adiff -ur ORBit2-2.14.18-old/src/orb/orb-core/corba-orb.c ORBit2-2.14.18-new/src/orb/orb-core/corba-orb.c
11439N/A--- ORBit2-2.14.18-old/src/orb/orb-core/corba-orb.c 2009-04-18 20:20:54.000000000 +0800
10139N/A+++ ORBit2-2.14.18-new/src/orb/orb-core/corba-orb.c 2010-05-28 14:35:25.821387536 +0800
10139N/A@@ -1442,6 +1442,12 @@
11149N/A return giop_recv_get_limit ();
12773N/A }
12773N/A
12773N/A+void
12773N/A+ORBit_set_giop_main_context (GMainContext *context)
12773N/A+{
10139N/A+ giop_set_main_context (context);
10139N/A+}
10139N/A+
10139N/A const ORBit_option orbit_supported_options[] = {
10139N/A { "ORBid", ORBIT_OPTION_STRING, NULL }, /* FIXME: unimplemented */
10139N/A { "ORBImplRepoIOR", ORBIT_OPTION_STRING, NULL }, /* FIXME: unimplemented */
10139N/A