Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Bug_2084_Regression / EventNode.cpp
blob72bdd5623a407cb9f6d42d4f1030d1d06416a277
1 #include "EventNode.h"
2 #include "tid_to_int.h"
3 #include "tao/ORB_Core.h"
4 #include "tao/ORB_Table.h"
5 #include "tao/ORB_Core_Auto_Ptr.h"
7 EventNode::EventNode (CORBA::ORB_ptr orb, ACE_thread_t thrid)
8 : orb_ (CORBA::ORB::_duplicate (orb))
9 , thr_id_ (thrid)
13 void EventNode::registerHello (::Test::Hello_ptr h)
15 ACE_DEBUG ((LM_DEBUG,
16 "(%P|%t) EventNode: registerHello will call get_string...\n"));
18 if (ACE_Thread::self () == this->thr_id_)
20 if (this->orb_->orb_core ()->optimize_collocation_objects () &&
21 this->orb_->orb_core ()->use_global_collocation ())
23 ACE_ERROR ((LM_ERROR,
24 "(%P|%t) ERROR: A remote call has been made "
25 " exiting ..\n"));
26 ACE_OS::abort ();
28 else if (this->orb_->orb_core ()->optimize_collocation_objects () &&
29 this->orb_->orb_core ()->use_global_collocation () == 0)
31 TAO::ORB_Table * const orb_table =
32 TAO::ORB_Table::instance ();
34 TAO_ORB_Core_Auto_Ptr tmp (orb_table->find ("server_orb"));
35 if (tmp.get () == nullptr)
37 // We are running on a single ORB and this is an error.
38 ACE_ERROR ((LM_ERROR,
39 "(%P|%t) ERROR: A remote call has been made "
40 " with a single ORB "
41 " exiting ..\n"));
42 ACE_OS::abort ();
47 CORBA::String_var str = h->get_string(
48 ACE_thread_t_to_integer< ::Test::ThreadId> (ACE_Thread::self ()));
49 ACE_DEBUG ((LM_DEBUG,
50 "(%P|%t) - EventNode: string returned <%C>\n",
51 str.in ()));
54 void
55 EventNode::shutdown ()
57 this->orb_->shutdown (false);