Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Security / MT_IIOP_SSL / test_i.cpp
blobd1d6d3cec23110850e9ccb146aebb18b9f5d2380
1 #include "test_i.h"
2 #include "tao/debug.h"
3 #include "tao/ORB_Core.h"
4 #include "tao/Thread_Lane_Resources.h"
5 #include "tao/Transport_Cache_Manager.h"
6 #include "orbsvcs/SSLIOP/SSLIOP_Transport.h"
7 #include "ace/OS_NS_unistd.h"
9 #if !defined(__ACE_INLINE__)
10 #include "test_i.inl"
11 #endif /* __ACE_INLINE__ */
13 void
14 Simple_Server_i::ping ()
18 void
19 Simple_Server_i::validate_protocol ()
21 if (this->validated_ == NOT_VALIDATED)
23 ACE_MT (ACE_GUARD (TAO_SYNCH_MUTEX,
24 ace_mon,
25 this->mutex_));
27 if (this->validated_ != NOT_VALIDATED)
28 return;
30 TAO::Transport_Cache_Manager::HASH_MAP &map =
31 this->orb_->orb_core ()->lane_resources ().transport_cache ().map ();
33 TAO::Transport_Cache_Manager::HASH_MAP_ITER st_iter =
34 map.begin ();
36 TAO::Transport_Cache_Manager::HASH_MAP_ITER end_iter =
37 map.end ();
39 for (TAO::Transport_Cache_Manager::HASH_MAP_ITER iter = st_iter;
40 iter != end_iter;
41 ++iter)
43 TAO_Transport *t =
44 (*iter).int_id_.transport ();
46 // @@ Worst possible way to check. If SSLIOP had a tag
47 // things would have been a lot simpler.
48 TAO::SSLIOP::Transport *ssl_t =
49 dynamic_cast<TAO::SSLIOP::Transport *> (t);
51 // There should be no SSL Transport
52 if (ssl_t != 0)
54 this->validated_ = VALIDATED_NOSUCCESS;
55 break;
61 if (this->validated_ == VALIDATED_NOSUCCESS)
62 throw Simple_Server::WrongProtocolType ();
65 CORBA::Long
66 Simple_Server_i::test_method (CORBA::Long x)
68 if (TAO_debug_level > 0)
69 ACE_DEBUG ((LM_DEBUG, "Request in thread [%t]\n"));
70 ACE_Time_Value tv (0, 15000);
71 ACE_OS::sleep (tv);
72 return x;
75 void
76 Simple_Server_i::shutdown ()
78 this->orb_->shutdown (false);