summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-06 22:17:39 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-01-06 22:17:39 +0000
commit73614f50438a2dcbe4481cce4bddb785a885ba22 (patch)
tree8ca66e1badb311c210cfd4e5993c8e9dcd70f0e1
parent34f007946274987a7b06ac1dbfdbc92a4ea4f0ba (diff)
downloadATCD-73614f50438a2dcbe4481cce4bddb785a885ba22.tar.gz
(init_IR): added .in () dereference to "time_service_server_"
-rw-r--r--TAO/orbsvcs/Time_Service/Server_i.cpp188
1 files changed, 94 insertions, 94 deletions
diff --git a/TAO/orbsvcs/Time_Service/Server_i.cpp b/TAO/orbsvcs/Time_Service/Server_i.cpp
index 414fdf73153..78859a0eace 100644
--- a/TAO/orbsvcs/Time_Service/Server_i.cpp
+++ b/TAO/orbsvcs/Time_Service/Server_i.cpp
@@ -37,7 +37,7 @@ Server_i::parse_args (void)
break;
case 'o': // output the IOR to a file.
this->ior_output_file_ =
- ACE_OS::fopen (get_opts.optarg, "w");
+ ACE_OS::fopen (get_opts.optarg, "w");
if (this->ior_output_file_ == 0)
ACE_ERROR_RETURN ((LM_ERROR,
@@ -45,11 +45,11 @@ Server_i::parse_args (void)
get_opts.optarg), -1);
break;
case 'i': // Use the Implementation Repository.
- this->use_ir_ = 1;
- break;
+ this->use_ir_ = 1;
+ break;
case 'r': // Register with the Implementation repository.
- this->register_with_ir_ = 1;
- break;
+ this->register_with_ir_ = 1;
+ break;
case '?': // display help for use of the server.
default:
ACE_ERROR_RETURN ((LM_ERROR,
@@ -58,7 +58,7 @@ Server_i::parse_args (void)
" [-d]"
" [-o] <ior_output_file>"
" [-i] <Use the Implementation Repository>"
- " [-r] <Register with the Implementation Repository>"
+ " [-r] <Register with the Implementation Repository>"
"\n",
argv_ [0]),
1);
@@ -79,13 +79,13 @@ Server_i::init_naming_service (CORBA::Environment& env)
{
// Initialize the POA.
this->orb_manager_.init_child_poa (this->argc_,
- this->argv_,
- "my_child_poa",
- TAO_TRY_ENV);
+ this->argv_,
+ "my_child_poa",
+ TAO_TRY_ENV);
TAO_CHECK_ENV;
PortableServer::POA_ptr child_poa
- = this->orb_manager_.child_poa ();
+ = this->orb_manager_.child_poa ();
// Initialize the Naming Server. Note the Naming Server cannot
// be initialized with the Root POA because it has to be a
@@ -94,8 +94,8 @@ Server_i::init_naming_service (CORBA::Environment& env)
// use the Root POA for the servants.
if (this->my_name_server_.init (this->orb_.in (),
- child_poa) == -1)
- return -1;
+ child_poa) == -1)
+ return -1;
}
TAO_CATCHANY
{
@@ -118,45 +118,45 @@ Server_i::init_IR (void)
{
if (this->use_ir_ == 1)
- {
- ACE_NEW_RETURN (this->ir_helper_,
- IR_Helper ("child_poa",
- this->orb_manager_.child_poa (),
- this->orb_manager_.orb (),
- TAO_debug_level),
- -1);
+ {
+ ACE_NEW_RETURN (this->ir_helper_,
+ IR_Helper ("child_poa",
+ this->orb_manager_.child_poa (),
+ this->orb_manager_.orb (),
+ TAO_debug_level),
+ -1);
- if (this->register_with_ir_ == 1)
- this->ir_helper_->register_server ("server -i -ORBobjrefstyle url");
+ if (this->register_with_ir_ == 1)
+ this->ir_helper_->register_server ("server -i -ORBobjrefstyle url");
- this->ir_helper_->change_object (this->time_service_server_,
- TAO_TRY_ENV);
- }
+ this->ir_helper_->change_object (this->time_service_server_,
+ TAO_TRY_ENV);
+ }
TAO_CHECK_ENV_RETURN (TAO_TRY_ENV, -1);
// Convert the IR server reference to a string.
CORBA::String_var objref_server =
- this->orb_manager_.orb ()->object_to_string (this->time_service_server_.in (),
- TAO_TRY_ENV);
+ this->orb_manager_.orb ()->object_to_string (this->time_service_server_.in (),
+ TAO_TRY_ENV);
TAO_CHECK_ENV_RETURN (TAO_TRY_ENV, -1);
// Print the IR server IOR on the console.
ACE_DEBUG ((LM_DEBUG,
- "[SERVER] Process/Thread : (%P/%t) The Time Service IREPO SERVER IOR is: <%s>\n",
- objref_server.in ()));
+ "[SERVER] Process/Thread : (%P/%t) The Time Service IREPO SERVER IOR is: <%s>\n",
+ objref_server.in ()));
// Print the IOR to a file.
if (this->ior_output_file_)
- {
- ACE_OS::fprintf (this->ior_output_file_,
- "%s\n",
- objref_server.in ());
- ACE_OS::fclose (this->ior_output_file_);
- }
-
- }
+ {
+ ACE_OS::fprintf (this->ior_output_file_,
+ "%s\n",
+ objref_server.in ());
+ ACE_OS::fclose (this->ior_output_file_);
+ }
+
+ }
TAO_CATCHANY
{
TAO_TRY_ENV.print_exception ("Exception:");
@@ -177,31 +177,31 @@ Server_i::create_server (void)
{
// Create a new server object.
ACE_NEW_RETURN (this->time_service_server_impl_,
- TAO_Time_Service_Server(this->use_ir_),
- 0);
+ TAO_Time_Service_Server(this->use_ir_),
+ 0);
// Generate IOR of the <TimeService Server> and register with
// POA.
- //this->time_service_server_ =
- //time_service_server_impl_->_this ();
+ //this->time_service_server_ =
+ //time_service_server_impl_->_this ();
// Register a servant with the child poa.
CORBA::String_var server_str =
- this->orb_manager_.activate_under_child_poa ("TimeServer",
- this->time_service_server_impl_,
- TAO_TRY_ENV);
+ this->orb_manager_.activate_under_child_poa ("TimeServer",
+ this->time_service_server_impl_,
+ TAO_TRY_ENV);
TAO_CHECK_ENV;
PortableServer::ObjectId_var id =
- PortableServer::string_to_ObjectId ("TimeServer");
+ PortableServer::string_to_ObjectId ("TimeServer");
CORBA::Object_var server_ref =
- this->orb_manager_.child_poa ()->id_to_reference (id.in (),
- TAO_TRY_ENV);
+ this->orb_manager_.child_poa ()->id_to_reference (id.in (),
+ TAO_TRY_ENV);
- this->time_service_server_ = CosTime::TimeService::_narrow (server_ref,
- TAO_TRY_ENV);
+ this->time_service_server_ = CosTime::TimeService::_narrow (server_ref.in (),
+ TAO_TRY_ENV);
TAO_CHECK_ENV_RETURN (TAO_TRY_ENV, -1);
@@ -210,35 +210,35 @@ Server_i::create_server (void)
// Convert the server reference to a string.
CORBA::String_var objref_server =
- this->orb_->object_to_string (this->time_service_server_.in (),
- TAO_TRY_ENV);
+ this->orb_->object_to_string (this->time_service_server_.in (),
+ TAO_TRY_ENV);
// Print the server IOR on the console.
ACE_DEBUG ((LM_DEBUG,
- "[SERVER] Process/Thread Id : (%P/%t) The Time Service "
- "SERVER IOR without Implementation Repository is: <%s>\n",
- objref_server.in ()));
+ "[SERVER] Process/Thread Id : (%P/%t) The Time Service "
+ "SERVER IOR without Implementation Repository is: <%s>\n",
+ objref_server.in ()));
// The IOR after registering with the child poa is much bigger than
// if the object was registered with the root poa. why ??
//ACE_DEBUG ((LM_DEBUG,
- // "[SERVER] Process/Thread Id : (%P/%t) The Time Service "
+ // "[SERVER] Process/Thread Id : (%P/%t) The Time Service "
// "SERVER IOR without Implementation Repository is: <%s>\n",
// server_str.in ()));
// Print the Time Service server IOR to a file.
// Convert the server reference to a string.
// CORBA::String_var objref_server =
- // this->orb_->object_to_string (this->time_service_server_.in (),
- // TAO_TRY_ENV);
+ // this->orb_->object_to_string (this->time_service_server_.in (),
+ // TAO_TRY_ENV);
// TAO_CHECK_ENV_RETURN (TAO_TRY_ENV, -1);
// // Print the server IOR on the console.
// ACE_DEBUG ((LM_DEBUG,
- // "[SERVER] Process/Thread Id : (%P/%t) The Time Service SERVER IOR is: <%s>\n",
- // objref_server.in ()));
+ // "[SERVER] Process/Thread Id : (%P/%t) The Time Service SERVER IOR is: <%s>\n",
+ // objref_server.in ()));
// Print the Time Service server IOR to a file.
@@ -264,7 +264,7 @@ Server_i::if_first_server (CosNaming::Name &server_context_name)
TAO_TRY
{
this->my_name_server_->resolve
- (server_context_name, TAO_TRY_ENV);
+ (server_context_name, TAO_TRY_ENV);
TAO_CHECK_ENV;
}
TAO_CATCH (CORBA::UserException, userex)
@@ -294,18 +294,18 @@ Server_i::register_server (void)
// and bind it to the Naming Server.
if (if_first_server (server_context_name))
- {
- // Get context.
- server_context =
+ {
+ // Get context.
+ server_context =
this->my_name_server_->new_context (TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ TAO_CHECK_ENV;
- // Bind.
- this->my_name_server_->rebind_context (server_context_name,
- server_context.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
+ // Bind.
+ this->my_name_server_->rebind_context (server_context_name,
+ server_context.in (),
+ TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+ }
char host_name[MAXHOSTNAMELEN];
char server_mc_name[MAXHOSTNAMELEN];
@@ -322,13 +322,13 @@ Server_i::register_server (void)
// to the Naming Server.
this->my_name_server_->rebind (server_name,
- this->time_service_server_.in (),
- TAO_TRY_ENV);
+ this->time_service_server_.in (),
+ TAO_TRY_ENV);
TAO_CHECK_ENV;
ACE_DEBUG ((LM_DEBUG,
- "Binding ServerContext -> %s\n",
- server_name[1].id.in ()));
+ "Binding ServerContext -> %s\n",
+ server_name[1].id.in ()));
}
TAO_CATCHANY
{
@@ -346,8 +346,8 @@ Server_i::register_server (void)
int
Server_i::init (int argc,
- char *argv[],
- CORBA::Environment &env)
+ char *argv[],
+ CORBA::Environment &env)
{
this->argc_ = argc;
this->argv_ = argv;
@@ -359,20 +359,20 @@ Server_i::init (int argc,
// create a child POA under the root POA.
if (this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa",
- TAO_TRY_ENV) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "init_child_poa"),
- -1);
+ argv,
+ "child_poa",
+ TAO_TRY_ENV) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "init_child_poa"),
+ -1);
TAO_CHECK_ENV_RETURN (TAO_TRY_ENV, -1);
int result = this->parse_args ();
if (result != 0)
- return result;
+ return result;
// Get the orb.
this->orb_ = this->orb_manager_.orb ();
@@ -408,22 +408,22 @@ Server_i::run (CORBA::Environment &env)
{
/*
if (this->use_ir_ == 1)
- {
- this->ir_helper_->notify_startup (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
+ {
+ this->ir_helper_->notify_startup (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+ }
*/
// Run the main event loop for the ORB.
if (this->orb_manager_.run (TAO_TRY_ENV) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "[SERVER] Process/Thread Id : (%P/%t) Server_i::run"),
- -1);
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "[SERVER] Process/Thread Id : (%P/%t) Server_i::run"),
+ -1);
/*
if (this->use_ir_ == 1)
- {
- this->ir_helper_->notify_shutdown (TAO_TRY_ENV);
- TAO_CHECK_ENV;
- }
+ {
+ this->ir_helper_->notify_shutdown (TAO_TRY_ENV);
+ TAO_CHECK_ENV;
+ }
*/
}