summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-22 08:49:06 +0000
committersergio <sergio@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-03-22 08:49:06 +0000
commit9b804075523e882d9e1ac688123a41a7b4304f51 (patch)
tree6bd5c027bee7b7eef40b531d20a81ea25e551b29
parentdfc12352ce4aff536258744a00cc964bec79146a (diff)
downloadATCD-9b804075523e882d9e1ac688123a41a7b4304f51.tar.gz
*** empty log message ***
-rw-r--r--TAO/ChangeLog-98c8
-rw-r--r--TAO/tao/ORB_Core.cpp62
2 files changed, 63 insertions, 7 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 9887e3dc783..9d0ca2287d1 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,11 @@
+Sun Mar 22 02:39:54 1998 Sergio Flores <sergio@lambada.cs.wustl.edu>
+
+ * tao/ORB_Core.cpp (TAO_ORB_Core::init): made change to check for
+ the return value when initializing service configurator and the ORB
+ Core instance.
+ * tao/ORB_Core.cpp (TAO_Resource_Factory::parse_args): changes to
+ correctly parse the options for "-ORBresources" and "-ORBpoa"
+
Sun Mar 22 01:52:01 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
* tao/CORBA.cpp: Moved TAO_Exceptions::init_standard_exceptions()
diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp
index 0f6185e7885..3d6243686c6 100644
--- a/TAO/tao/ORB_Core.cpp
+++ b/TAO/tao/ORB_Core.cpp
@@ -329,9 +329,17 @@ TAO_ORB_Core::init (int& argc, char** argv)
ACE_OS::socket_init (ACE_WSOCK_VERSION);
// Initialize the Service Configurator
- TAO_Internal::open_services (svc_config_argc, svc_config_argv);
+ // -check for return values.
+ int result = TAO_Internal::open_services (svc_config_argc, svc_config_argv);
delete [] svc_config_argv;
+ // check for errors returned from TAO_Internal::open_services()
+ if (result == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "(%P|%t) %p\n",
+ "ORB Core unable to initialize the Service Configurator"),
+ -1);
+
// Initialize the pointers to resources in the ORB Core instance,
// e.g., reactor, connector, etc. Must do this after we open
// services because we'll load the factory from there.
@@ -721,6 +729,26 @@ int
TAO_Resource_Factory::parse_args (int argc, char **argv)
{
ACE_TRACE ("TAO_Default_Server_Strategy_Factory::parse_args");
+ // This table shows the arguments that are parsed with their valid
+ // combinations.
+ //
+ // ORB POA comments
+ // +-------+-------+-----------------+
+ // | TSS | TSS | if ORB==TSS |
+ // | | | then POA=TSS |
+ // | | | as def.value. |
+ // +-------+-------+-----------------+
+ // | TSS | GLOBAL| ok. |
+ // +-------+-------+-----------------+
+ // | GLOBAL| GLOBAL| if ORB==Global |
+ // | | | then POA=Global |
+ // | | | as def.value. |
+ // +-------+-------+-----------------+
+ // | GLOBAL| TSS | *NOT VALID* |
+ // +-------+-------+-----------------+
+
+ int local_poa_source = -1;
+ int local_resource_source = -1;
for (int curarg = 0; curarg < argc; curarg++)
if (ACE_OS::strcmp (argv[curarg], "-ORBresources") == 0)
@@ -731,10 +759,9 @@ TAO_Resource_Factory::parse_args (int argc, char **argv)
char *name = argv[curarg];
if (ACE_OS::strcasecmp (name, "global") == 0)
- this->resource_source_ = TAO_GLOBAL;
+ local_resource_source = TAO_GLOBAL;
else if (ACE_OS::strcasecmp (name, "tss") == 0)
- this->resource_source_ = TAO_TSS;
- curarg++;
+ local_resource_source = TAO_TSS;
}
}
else if (ACE_OS::strcmp (argv[curarg], "-ORBpoa") == 0)
@@ -745,13 +772,34 @@ TAO_Resource_Factory::parse_args (int argc, char **argv)
char *name = argv[curarg];
if (ACE_OS::strcasecmp (name, "global") == 0)
- this->poa_source_ = TAO_GLOBAL;
+ local_poa_source = TAO_GLOBAL;
else if (ACE_OS::strcasecmp (name, "tss") == 0)
- this->poa_source_ = TAO_TSS;
- curarg++;
+ local_poa_source = TAO_TSS;
}
}
+ // Don't allow a global ORB and a tss POA.
+ if ( (local_resource_source == TAO_GLOBAL) &&
+ (local_poa_source == TAO_TSS) )
+ return -1;
+
+ // make poa=tss the default, if ORB is tss and the user didn't
+ // specify a value.
+ if ( (local_resource_source == TAO_TSS) &&
+ (local_poa_source == -1) )
+ local_poa_source = TAO_TSS;
+
+ // update the object data members.
+ if (local_resource_source != -1)
+ this->resource_source_ = local_resource_source;
+ if (local_poa_source != -1)
+ this->poa_source_ = local_poa_source;
+
+ // Don't allow a global ORB and a tss POA.
+ if ( (this->resource_source_ == TAO_GLOBAL) &&
+ (this->poa_source_ == TAO_TSS) )
+ return -1;
+
return 0;
}