Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / orbsvcs / tests / Bug_2248_Regression / test_i.cpp
blob0ff6c3fa130dfaf146dbe0ca219566e90f2c6f4d
1 #include "test_i.h"
3 #include "ace/OS_NS_stdio.h"
4 #include "ace/OS_NS_string.h"
6 Simple_Server_i::Simple_Server_i (CORBA::ORB_ptr orb, const char* key)
7 : orb_ (CORBA::ORB::_duplicate (orb))
8 , _key (CORBA::string_dup (key))
12 Simple_Server_i::Simple_Server_i ()
13 : orb_ (0)
17 char*
18 Simple_Server_i::remote_call ()
20 ACE_DEBUG ((LM_DEBUG, "SERVER(%C)> executing remote_call()\n", _key.in()));
22 char buf[256];
23 ACE_OS::sprintf (buf, "remote_call() completed by %s", _key.in());
25 ACE_DEBUG ((LM_DEBUG, "SERVER(%C)> returning '%C'\n", _key.in(), buf));
26 return CORBA::string_dup (buf);
30 char*
31 Simple_Server_i::shutdown (const char* key)
33 //FUZZ: disable check_for_lack_ACE_OS
34 ACE_DEBUG ((LM_DEBUG, "SERVER(%C)> executing shutdown()\n", _key.in()));
35 //FUZZ: enable check_for_lack_ACE_OS
37 int still_alive = 1;
38 if (!ACE_OS::strcmp (_key.in(), key))
40 this->orb_->shutdown (false);
41 still_alive = 0;
44 char buf[256];
45 ACE_OS::sprintf (buf, "shutdown() completed by %s, still_alive=%d",
46 _key.in(), still_alive);
47 ACE_DEBUG ((LM_DEBUG, "SERVER(%C)> returning '%C'\n", _key.in(), buf));
48 return CORBA::string_dup (buf);
51 char*
52 Simple_Server_i::abort (const char* key)
54 //FUZZ: disable check_for_lack_ACE_OS
55 ACE_DEBUG ((LM_DEBUG, "SERVER(%C)> executing abort()\n", _key.in()));
56 //FUZZ: enable check_for_lack_ACE_OS
58 int still_alive = 1;
59 if (!ACE_OS::strcmp (_key.in(), key))
61 ACE_OS::abort();
62 still_alive = 0;
65 char buf[256];
66 ACE_OS::sprintf (buf, "abort() completed by %s, still_alive=%d",
67 _key.in(), still_alive);
68 ACE_DEBUG ((LM_DEBUG, "SERVER(%C)> returning '%C'\n", _key.in(), buf));
69 return CORBA::string_dup (buf);