summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1998-04-13 03:37:13 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1998-04-13 03:37:13 +0000
commit6750439929a1307e078c6a39b60fc109871f2062 (patch)
tree5bdfac4e0ff086b6e0fe6c20805c19f84e0e3398
parent52b4b3ffeaa1c08e0bcaf243dbac2d7175e5afd8 (diff)
downloadATCD-6750439929a1307e078c6a39b60fc109871f2062.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/TAO.h5
-rw-r--r--TAO/tests/Cubit/TAO/IDL_Cubit/server.cpp18
-rw-r--r--TAO/tests/Cubit/TAO/IDL_Cubit/server.h2
-rw-r--r--TAO/tests/Quoter/Quoter_Client.cpp38
-rw-r--r--TAO/tests/Quoter/Quoter_Server.cpp20
-rw-r--r--TAO/tests/Quoter/Quoter_Server.h3
6 files changed, 49 insertions, 37 deletions
diff --git a/TAO/tao/TAO.h b/TAO/tao/TAO.h
index a09f29ae288..8f30943723a 100644
--- a/TAO/tao/TAO.h
+++ b/TAO/tao/TAO.h
@@ -41,8 +41,7 @@ public:
char *argv[],
CORBA_Environment &env);
// Initialize the ORB/root POA, using the supplied command line
- // arguments or the default ORB components.
- // Returns -1 on failure
+ // arguments or the default ORB components. Returns -1 on failure.
int init_child_poa (int argc,
char *argv[],
@@ -50,7 +49,7 @@ public:
CORBA_Environment &env);
// Creates a child poa under the root poa with PERSISTENT and
// USER_ID policies. Call this if you want a <child_poa> with the
- // above policies, otherwise call init.
+ // above policies, otherwise call init. Returns -1 on failure.
CORBA::String activate (PortableServer::Servant servant,
CORBA_Environment &env);
diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/server.cpp b/TAO/tests/Cubit/TAO/IDL_Cubit/server.cpp
index 6246d9d2ce5..af9a8ddf22d 100644
--- a/TAO/tests/Cubit/TAO/IDL_Cubit/server.cpp
+++ b/TAO/tests/Cubit/TAO/IDL_Cubit/server.cpp
@@ -58,17 +58,21 @@ Cubit_Server::init (int argc,
{
// Call the init of TAO_ORB_Manager to create a child POA
// under the root POA.
- this->orb_manager_.init_child_poa (argc,
- argv,
- "child_poa",
- env);
+ if (this->orb_manager_.init_child_poa (argc,
+ argv,
+ "child_poa",
+ env) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "init_child_poa"),
+ -1);
TAO_CHECK_ENV_RETURN (env,-1);
this->argc_ = argc;
this->argv_ = argv;
this->parse_args ();
- // ~~ check for the return value here
+ // @@ Check for the return value here.
CORBA::String_var str =
this->orb_manager_.activate_under_child_poa ("factory",
@@ -80,9 +84,7 @@ Cubit_Server::init (int argc,
if (this->ior_output_file_)
{
- ACE_OS::fprintf (this->ior_output_file_,
- "%s",
- str.in ());
+ ACE_OS::fprintf (this->ior_output_file_, "%s", str.in ());
ACE_OS::fclose (this->ior_output_file_);
}
diff --git a/TAO/tests/Cubit/TAO/IDL_Cubit/server.h b/TAO/tests/Cubit/TAO/IDL_Cubit/server.h
index b4ddbb132f7..f97d6b75285 100644
--- a/TAO/tests/Cubit/TAO/IDL_Cubit/server.h
+++ b/TAO/tests/Cubit/TAO/IDL_Cubit/server.h
@@ -73,7 +73,7 @@ private:
// File to output the cubit factory IOR.
TAO_ORB_Manager orb_manager_;
- // The ORB manager
+ // The ORB manager.
TAO_Naming_Server my_name_server_;
// An instance of the name server used for registering the factory
diff --git a/TAO/tests/Quoter/Quoter_Client.cpp b/TAO/tests/Quoter/Quoter_Client.cpp
index 7a40abf08e8..2dbebc7b4fb 100644
--- a/TAO/tests/Quoter/Quoter_Client.cpp
+++ b/TAO/tests/Quoter/Quoter_Client.cpp
@@ -287,30 +287,30 @@ Quoter_Client::init (int argc, char **argv)
if (naming_result == -1)
return naming_result;
}
- else if (this->quoter_factory_key_ == 0)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- "%s: no quoter factory key specified\n",
- this->argv_[0]),
- -1);
-
-
- CORBA::Object_var factory_object =
+ else
+ {
+ if (this->quoter_factory_key_ == 0)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%s: no quoter factory key specified\n",
+ this->argv_[0]),
+ -1);
+
+ CORBA::Object_var factory_object =
this->orb_->string_to_object (this->quoter_factory_key_,
TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ TAO_CHECK_ENV;
- this->factory_ = Stock::Quoter_Factory::_narrow (factory_object.in (),
- TAO_TRY_ENV);
- TAO_CHECK_ENV;
+ this->factory_ = Stock::Quoter_Factory::_narrow (factory_object.in (),
+ TAO_TRY_ENV);
+ TAO_CHECK_ENV;
- if (CORBA::is_nil (this->factory_.in ()))
- {
- ACE_ERROR_RETURN ((LM_ERROR,"invalid factory key <%s>\n",
- this->quoter_factory_key_),
- -1);
+ if (CORBA::is_nil (this->factory_.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,"invalid factory key <%s>\n",
+ this->quoter_factory_key_),
+ -1);
+ }
}
- }
ACE_DEBUG ((LM_DEBUG, "Factory received OK\n"));
diff --git a/TAO/tests/Quoter/Quoter_Server.cpp b/TAO/tests/Quoter/Quoter_Server.cpp
index c0ccb8d5e31..20231e7182f 100644
--- a/TAO/tests/Quoter/Quoter_Server.cpp
+++ b/TAO/tests/Quoter/Quoter_Server.cpp
@@ -69,20 +69,28 @@ Quoter_Server::init (int argc,
char* argv[],
CORBA::Environment& env)
{
- //TAO_ORB_Manager::init();
+ if (this->orb_manager_.init (argc,
+ argv,
+ env) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "init"),
+ -1);
- // copy them, because parse_args expects them there
+ // Copy them, because parse_args expects them there.
this->argc_ = argc;
this->argv_ = argv;
this->parse_args ();
-
- // activate the object
+ // Activate the object.
CORBA::String_var str =
- this->activate (&this->quoter_Factory_Impl_, env);
+ this->orb_manager_.activate (&this->quoter_Factory_Impl_,
+ env);
- ACE_DEBUG ((LM_DEBUG, "The IOR is: <%s>\n", str.in ()));
+ ACE_DEBUG ((LM_DEBUG,
+ "The IOR is: <%s>\n",
+ str.in ()));
if (this->ior_output_file_)
{
diff --git a/TAO/tests/Quoter/Quoter_Server.h b/TAO/tests/Quoter/Quoter_Server.h
index 92e3edac82f..77935b64806 100644
--- a/TAO/tests/Quoter/Quoter_Server.h
+++ b/TAO/tests/Quoter/Quoter_Server.h
@@ -70,6 +70,9 @@ private:
FILE* ior_output_file_;
// File to output the cubit factory IOR.
+ TAO_ORB_Manager orb_manager_;
+ // The ORB manager.
+
TAO_Naming_Server my_name_server_;
// An instance of the name server used for registering the factory
// objects.