patches/at-spi-04-custom-g-main-context.diff
author rohinis
Tue, 29 Nov 2011 17:32:55 +0000
branchs11express-2010-11
changeset 22234 c23e64da3e06
parent 18049 670d15b2932e
permissions -rw-r--r--
2011-11-29 Rohini S <[email protected]> * patches/Python26-22-audio.diff: Fixes CVE-2010-1634 * specs/SUNWPython26.spec: Fixes CR 7085446
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18046
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
     1
diff -ur at-spi-1.30.1-old/atk-bridge/bridge.c at-spi-1.30.1-new/atk-bridge/bridge.c
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
     2
--- at-spi-1.30.1-old/atk-bridge/bridge.c	2010-03-12 18:34:17.000000000 +0800
18049
670d15b2932e 2010-05-28 Ke Wang <[email protected]>
wangke
parents: 18046
diff changeset
     3
+++ at-spi-1.30.1-new/atk-bridge/bridge.c	2010-05-28 17:05:24.084309793 +0800
670d15b2932e 2010-05-28 Ke Wang <[email protected]>
wangke
parents: 18046
diff changeset
     4
@@ -213,11 +213,22 @@
18046
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
     5
   if (debug_env_string) 
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
     6
       _dbg = (int) g_ascii_strtod (debug_env_string, NULL);
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
     7
 
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
     8
+  GMainContext* orb_context = g_main_context_get_thread_default();
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
     9
+  ORBit_set_giop_main_context (orb_context);
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    10
+
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    11
   if (!bonobo_init (argc, argv ? *argv : NULL))
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    12
     {
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    13
       g_error ("Could not initialize Bonobo");
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    14
     }
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    15
 
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    16
+  if ( orb_context != NULL ) {
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    17
+	  CORBA_ORB orb = bonobo_activation_orb_get();
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    18
+	  PortableServer_POA poa = (PortableServer_POA)
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    19
+		  CORBA_ORB_resolve_initial_references (orb, "RootPOA", &ev);
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    20
+	  ORBit_ObjectAdaptor_set_thread_hint((ORBit_ObjectAdaptor)poa,
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    21
+			  ORBIT_THREAD_HINT_ON_CONTEXT, orb_context);
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    22
+  }
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    23
+
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    24
   bonobo_activate ();
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    25
 
630d2ec3d530 2010-05-28 Ke Wang <[email protected]>
wangke
parents:
diff changeset
    26
   /* Create the accessible application server object */