diff options
Diffstat (limited to 'TAO/tests/Bug_1383_Regression')
-rw-r--r-- | TAO/tests/Bug_1383_Regression/SimpleClient.cpp | 14 | ||||
-rw-r--r-- | TAO/tests/Bug_1383_Regression/SimpleServer.cpp | 7 |
2 files changed, 16 insertions, 5 deletions
diff --git a/TAO/tests/Bug_1383_Regression/SimpleClient.cpp b/TAO/tests/Bug_1383_Regression/SimpleClient.cpp index 7d3089b7a7f..8208c7a5ae9 100644 --- a/TAO/tests/Bug_1383_Regression/SimpleClient.cpp +++ b/TAO/tests/Bug_1383_Regression/SimpleClient.cpp @@ -72,10 +72,16 @@ int main(int argc, char * argv[]) CORBA::String_var name1_ior = orb->object_to_string(name1.in()); CORBA::String_var name2_ior = orb->object_to_string(name2.in()); - // create a callback object - Callee_i * callee_i = new Callee_i; - // get the CORBA reference - Callee_var callee = callee_i->_this(); + // create a callback object + Callee_i * callee_i = new Callee_i; + // get the CORBA reference + PortableServer::ObjectId_var id = + poa->activate_object (callee_i); + + CORBA::Object_var object_act = poa->id_to_reference (id.in ()); + + Callee_var callee = Callee::_narrow (object_act.in ()); + if (CORBA::is_nil(callee.in ())) { ACE_ERROR ((LM_ERROR, "could not get callback object\n")); return 1; diff --git a/TAO/tests/Bug_1383_Regression/SimpleServer.cpp b/TAO/tests/Bug_1383_Regression/SimpleServer.cpp index c9de7d114bb..db025f79365 100644 --- a/TAO/tests/Bug_1383_Regression/SimpleServer.cpp +++ b/TAO/tests/Bug_1383_Regression/SimpleServer.cpp @@ -44,7 +44,12 @@ int main(int argc, char * argv[]) // it. It uses the "RootPOA" for dispatching its calls. There are // a number of ways this can be done different. Refer to "Advanced // CORBA Programming with C++" chapter 11 for more information. - Simple_var simpleRef = simple->_this(); + PortableServer::ObjectId_var id = + poa->activate_object (simple); + + CORBA::Object_var object_act = poa->id_to_reference (id.in ()); + + Simple_var simpleRef = Simple::_narrow (object_act.in ()); advertise(orb.in(), simpleRef.in()); |