Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / Bug_3953_Regression / server_i.cpp
blob5622dd31ddf7bac8f0776f575df545adccce14e1
1 #include "server_i.h"
3 server_i::server_i (int quiet,
4 CORBA::ORB_ptr orb)
5 : quiet_ (quiet),
6 orb_ (CORBA::ORB::_duplicate (orb)),
7 exception_ (false)
11 void
12 server_i::start (client_ptr c,
13 CORBA::UShort time_to_live)
15 this->client_ = client::_duplicate (c);
16 this->ping (time_to_live);
19 bool
20 server_i::exception () const
22 return this->exception_;
25 void
26 server_i::ping (CORBA::UShort time_to_live)
28 if (!this->quiet_)
29 ACE_DEBUG ((LM_DEBUG,
30 "(%t) server_i::ping -> time to live = %d\n",
31 time_to_live));
33 try
35 --time_to_live;
37 if (time_to_live > 0)
39 this->client_->ping (time_to_live);
42 catch (const CORBA::TIMEOUT&)
44 this->exception_ = true;
45 ACE_DEBUG ((LM_DEBUG,
46 "server ping received an expected except.\n"));
50 void
51 server_i::shutdown ()
53 this->orb_->shutdown (false);