Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / HTIOP / BiDirectional / test_i.cpp
blob3bf577a904af923ef38e64cb38a0355ac10697bf
1 #include "test_i.h"
3 #include "tao/ORB_Core.h"
4 #include "tao/debug.h"
5 #include "tao/Transport_Cache_Manager.h"
6 #include "tao/Thread_Lane_Resources.h"
8 #if !defined(__ACE_INLINE__)
9 #include "test_i.inl"
10 #endif /* __ACE_INLINE__ */
13 void
14 Callback_i::shutdown ()
16 ACE_DEBUG ((LM_DEBUG, "Performing clean shutdown\n"));
17 this->orb_->shutdown (false);
20 void
21 Callback_i::callback_method ()
23 if (TAO_debug_level > 0)
24 ACE_DEBUG ((LM_DEBUG, "Callback method called\n"));
28 // ****************************************************************
30 CORBA::Long
31 Simple_Server_i::test_method (CORBA::Boolean do_callback
34 if (do_callback)
36 this->flag_ = 1;
39 return 0;
42 void
43 Simple_Server_i::callback_object (Callback_ptr callback
46 // Store the callback object
47 this->callback_ = Callback::_duplicate (callback);
50 int
51 Simple_Server_i::call_client ()
53 if (this->flag_)
55 ACE_DEBUG ((LM_DEBUG,"calling client\n"));
57 for (int times = 0; times < this->no_iterations_; ++times)
59 this->callback_->callback_method ();
61 if (this->orb_->orb_core ()->lane_resources ().transport_cache ().current_size () > 1)
63 ACE_ERROR ((LM_ERROR,
64 "(%P|%t) The cache has grown, aborting ..\n"));
66 ACE_OS::abort ();
70 this->callback_->shutdown ();
71 this->flag_ = 0;
73 return 1;
76 return 0;
80 void
81 Simple_Server_i::shutdown ()
83 this->orb_->shutdown (false);