summaryrefslogtreecommitdiff
path: root/TAO
diff options
context:
space:
mode:
authorpgontla <pgontla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-09-06 16:06:51 +0000
committerpgontla <pgontla@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-09-06 16:06:51 +0000
commit0e5fd874bf89cb94dbeeca69c45a299c6d8a7924 (patch)
tree935f9e1591f43482d7bc623a704bc4f29c7815be /TAO
parent5272c277205295cba2daa520bfb3d856634e3ab8 (diff)
downloadATCD-0e5fd874bf89cb94dbeeca69c45a299c6d8a7924.tar.gz
ChangeLogTag: Fri Sep 6 09:03:50 2002 Priyanka Gontla <pgontla@ece.uci.edu>
Diffstat (limited to 'TAO')
-rw-r--r--TAO/ChangeLog12
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp41
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp29
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Options.h18
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.cpp20
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.h16
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/Server_Repository.cpp6
-rw-r--r--TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp3
8 files changed, 88 insertions, 57 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index e77c6825dd6..e812c9a8ecd 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,15 @@
+Fri Sep 6 09:03:50 2002 Priyanka Gontla <pgontla@ece.uci.edu>
+
+ * orbsvcs/ImplRepo_Service/Options.h:
+ * orbsvcs/ImplRepo_Service/Server_Repository.cpp:
+ * orbsvcs/ImplRepo_Service/tao_imr_i.cpp:
+ * orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp:
+ * orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp:
+ * orbsvcs/ImplRepo_Service/Repository_Configuration.cpp:
+ * orbsvcs/ImplRepo_Service/Repository_Configuration.h:
+ For some reason, the above files didnt get committed yesterday.
+ Recommitting them.
+
Fri Sep 6 03:54:01 UTC 2002 Craig Rodrigues <crodrigu@bbn.com>
* rules.tao.GNU: Remove deprecated use_flick macro for Flick IDL
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp
index bfb77566eb6..d60c1c5140e 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp
@@ -127,7 +127,7 @@ ImR_Activator_i::activate_server_with_startup (const char *server,
ACE_ERROR ((LM_ERROR,
"Error: Cannot find startup info for server <%s>\n",
server));
- ACE_THROW_RETURN(ImplementationRepository::NotFound (), "");
+ ACE_THROW_RETURN(ImplementationRepository::NotFound (), 0);
}
// Find out if it is already running
@@ -140,7 +140,7 @@ ImR_Activator_i::activate_server_with_startup (const char *server,
ACE_ERROR ((LM_ERROR,
"Error: Cannot find ServerObject IOR for server <%s>\n",
server));
- ACE_THROW_RETURN (ImplementationRepository::NotFound (), "");
+ ACE_THROW_RETURN (ImplementationRepository::NotFound (), 0);
}
// Check to see if there is one running (if there is a server_object_ior)
@@ -164,7 +164,7 @@ ImR_Activator_i::activate_server_with_startup (const char *server,
ACE_ERROR ((LM_ERROR,
"Error: Invalid ServerObject IOR: <%s>\n",
server_object_ior.c_str ()));
- ACE_THROW_RETURN (ImplementationRepository::NotFound (), "");
+ ACE_THROW_RETURN (ImplementationRepository::NotFound (), 0);
}
// Check to see if we can ping it
@@ -191,11 +191,11 @@ ImR_Activator_i::activate_server_with_startup (const char *server,
CORBA_SystemException::_tao_minor_code (TAO_IMPLREPO_MINOR_CODE,
0),
CORBA::COMPLETED_NO),
- "");
+ 0);
// Start the server.
this->start_server_i (server);
- ACE_CHECK_RETURN ("");
+ ACE_CHECK_RETURN (0);
}
// Get the latest information about where the server is running and
@@ -214,9 +214,9 @@ ImR_Activator_i::activate_server_with_startup (const char *server,
if (this->repository_.update (server, "", "") != 0)
{
ACE_ERROR ((LM_ERROR,
- "Error: Could not update information for server <%s>\n",
+ "Error: Could not update information for server <%s>\n",
server));
- ACE_THROW_RETURN (ImplementationRepository::NotFound (), "");
+ ACE_THROW_RETURN (ImplementationRepository::NotFound (), 0);
}
}
@@ -941,18 +941,33 @@ ImR_Activator_i::init (ACE_ENV_SINGLE_ARG_DECL)
// register this activator (with the name of the hostname where
// this instance is being run) with the locator.
- locator->register_activator (hostname,
- imr_obj.in ()
- ACE_ENV_ARG_PARAMETER);
+ CORBA::ULong reg_act =
+ locator->register_activator (hostname,
+ imr_obj.in ()
+ ACE_ENV_ARG_PARAMETER);
ACE_TRY_CHECK;
+ if (reg_act == 1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "Activator on %s didnt get registered\n"),
+ -1);
+ }
+
// Get reactor instance from TAO.
ACE_Reactor *reactor = orb->orb_core ()->reactor ();
// = Set up the process manager
-
- // Init the Process Manager.
- this->process_mgr_.open (ACE_Process_Manager::DEFAULT_SIZE, reactor);
+ if (reactor != 0)
+ {
+ // Init the Process Manager.
+ if (this->process_mgr_.open (ACE_Process_Manager::DEFAULT_SIZE, reactor) == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "The ACE_Process_Manager didnt get initialized\n"),
+ -1);
+ }
+ }
// Initialize the persistent storage
if (this->repository_.init ())
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp
index 6c73ba67d90..5220680df92 100644
--- a/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Locator_i.cpp
@@ -102,11 +102,11 @@ ImR_Locator_i::init (int argc, char *argv [] ACE_ENV_ARG_DECL)
// Get poa_manager reference
PortableServer::POAManager_var poa_manager =
- root_poa->the_POAManager (ACE_ENV_ARG_PARAMETER);
+ root_poa->the_POAManager (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Activate it.
- poa_manager->activate (ACE_ENV_ARG_PARAMETER);
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// We are going to set the policies to be used with the child
@@ -139,7 +139,7 @@ ImR_Locator_i::init (int argc, char *argv [] ACE_ENV_ARG_DECL)
for (CORBA::ULong i = 0; i < policies.length (); ++i)
{
CORBA::Policy_ptr policy = policies[i];
- policy->destroy (ACE_ENV_ARG_PARAMETER);
+ policy->destroy (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
}
@@ -247,11 +247,11 @@ ImR_Locator_i::init (int argc, char *argv [] ACE_ENV_ARG_DECL)
}
// Activate the POA Manager.
- poa_manager->activate (ACE_ENV_ARG_PARAMETER);
+ poa_manager->activate (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
// Run the ORB.
- orb->run (ACE_ENV_ARG_PARAMETER);
+ orb->run (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
return 0;
@@ -362,7 +362,7 @@ ImR_Locator_i::register_activator (const char *location,
if (bind_return == 1)
{
ACE_THROW_RETURN (ImplementationRepository::AlreadyRegistered (),
- -1);
+ 1);
}
else
{
@@ -376,7 +376,7 @@ ImR_Locator_i::register_activator (const char *location,
ImplementationRepository::Administration::_narrow (
CORBA::Object::_duplicate (object_ref)
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (-1);
+ ACE_CHECK_RETURN (1);
}
return 0;
}
@@ -397,7 +397,7 @@ ImR_Locator_i::unregister_activator (const char *location,
if (bind_return == 1)
{
ACE_THROW_RETURN (ImplementationRepository::NotFound (),
- -1);
+ 1);
}
else
return 0;
@@ -484,7 +484,7 @@ ImR_Locator_i::activate_server_with_startup (const char *server,
this->helper_for_choosing_activators (server,
next_entry->ext_id_.c_str ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ACE_CHECK_RETURN (0);
if (admin_ref.in () != 0)
{
@@ -493,7 +493,7 @@ ImR_Locator_i::activate_server_with_startup (const char *server,
admin_ref->activate_server_with_startup (server,
check_startup
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ACE_CHECK_RETURN (0);
return CORBA::string_dup (ior.c_str ());
}
@@ -504,7 +504,8 @@ ImR_Locator_i::activate_server_with_startup (const char *server,
ACE_ERROR ((LM_ERROR,
"Couldnt get a reference to an activator at %s\n",
next_entry->ext_id_.c_str ()));
- ACE_THROW (ImplementationRepository::NotFound ());
+ ACE_THROW_RETURN (ImplementationRepository::NotFound (),
+ 0);
}
else
{
@@ -513,7 +514,7 @@ ImR_Locator_i::activate_server_with_startup (const char *server,
this->default_admin_ref_->activate_server_with_startup (server,
check_startup
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ACE_CHECK_RETURN (0);
}
return CORBA::string_dup (ior.c_str ());
@@ -806,7 +807,7 @@ ImR_Locator_i::server_is_running (const char *server,
ImplementationRepository::Administration_var admin_ref =
this->choose_activator_using_location (hostname.c_str ()
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ACE_CHECK_RETURN (0);
// Invoke the required operation on that reference.
char *return_value =
@@ -814,7 +815,7 @@ ImR_Locator_i::server_is_running (const char *server,
location,
server_object
ACE_ENV_ARG_PARAMETER);
- ACE_CHECK;
+ ACE_CHECK_RETURN (0);
return return_value;
}
diff --git a/TAO/orbsvcs/ImplRepo_Service/Options.h b/TAO/orbsvcs/ImplRepo_Service/Options.h
index 411ddcbe30f..fe8caa9fa70 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Options.h
+++ b/TAO/orbsvcs/ImplRepo_Service/Options.h
@@ -43,7 +43,7 @@ public:
~Options();
/// Parse the command-line arguments and initialize the options.
- int init (int argc, ACE_TCHAR *argv[]);
+ int init (int argc, char *argv[]);
/// Service Mode
int service (void) const;
@@ -57,10 +57,10 @@ public:
/// Returns the configuration object.
Repository_Configuration* config (void) const;
- ACE_TCHAR *repository_mode (void);
+ char *repository_mode (void);
/// Returns the file addr.
- ACE_TCHAR *file_name (void) const;
+ char *file_name (void) const;
/// Converts the activation mode to a const char *. Needed to put
/// the activation mode into the XML file or print it out.
@@ -85,13 +85,13 @@ public:
private:
/// Parses and pulls out arguments for the ImR
- int parse_args (int &argc, ACE_TCHAR *argv[]);
+ int parse_args (int &argc, char *argv[]);
/// Print the usage information.
void print_usage (void) const;
/// Initialize file persistence.
- int initialize_file_persistence (const ACE_TCHAR *filename);
+ int initialize_file_persistence (const char *filename);
/// Initialize Registry persistence.
int initialize_registry_persistence (void);
@@ -100,10 +100,10 @@ private:
int initialize_non_persistence (void);
/// Initialize XML file persistence
- int initialize_xml_persistence (const ACE_TCHAR *file_name);
+ int initialize_xml_persistence (const char *file_name);
/// Run a service command.
- int run_service_command (const ACE_TCHAR *command);
+ int run_service_command (const char *command);
/// Loads ORB options from the registry
int load_registry_options (ACE_ARGV &orb_options);
@@ -112,10 +112,10 @@ private:
Repository_Configuration* repo_config_;
/// Mode of the Server Repository: if XML (x) or non-XML (n)
- ACE_TCHAR *repo_mode_;
+ char repo_mode_;
/// The persistent file option.
- ACE_TCHAR *file_name_;
+ char *file_name_;
/// Debug level.
unsigned int debug_;
diff --git a/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.cpp b/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.cpp
index 428a29ded42..e6d101b9aba 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.cpp
@@ -7,12 +7,12 @@
#if defined (ACE_WIN32)
const HKEY SERVICE_REG_ROOT = HKEY_LOCAL_MACHINE;
-const ACE_TCHAR *SERVICE_REG_PATH =
+const char *SERVICE_REG_PATH =
ACE_TEXT ("SYSTEM\\CurrentControlSet\\Services\\TAOImplRepo\\Parameters");
-const ACE_TCHAR *SERVICE_REG_VALUE_NAME = ACE_TEXT ("ORBOptions");
+const char *SERVICE_REG_VALUE_NAME = ACE_TEXT ("ORBOptions");
#endif /* ACE_WIN32 */
-Repository_Configuration::Repository_Configuration (ACE_TCHAR *repository_mode)
+Repository_Configuration::Repository_Configuration (const char *repository_mode)
: config_ (0)
{
/// Default Constructor
@@ -84,7 +84,7 @@ Repository_Configuration::open (void)
int
-Repository_Configuration::open (const ACE_TCHAR *file_name)
+Repository_Configuration::open (const char *file_name)
{
if (this->config_ == 0)
{
@@ -117,7 +117,7 @@ Repository_Configuration::open (const ACE_TCHAR *file_name)
int
Repository_Configuration::open_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
+ const char* sub_section,
int create,
ACE_Configuration_Section_Key& result)
{
@@ -138,7 +138,7 @@ Repository_Configuration::open_section (const ACE_Configuration_Section_Key& bas
int
Repository_Configuration::remove_section (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* sub_section,
+ const char* sub_section,
int recursive)
{
if (this->config_ == 0)
@@ -178,7 +178,7 @@ Repository_Configuration::enumerate_sections (const ACE_Configuration_Section_Ke
int
Repository_Configuration::set_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
const ACE_CString& value)
{
if (this->config_ == 0)
@@ -198,7 +198,7 @@ Repository_Configuration::set_string_value (const ACE_Configuration_Section_Key&
int
Repository_Configuration::set_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
u_int value)
{
if (this->config_ == 0)
@@ -217,7 +217,7 @@ Repository_Configuration::set_integer_value (const ACE_Configuration_Section_Key
int
Repository_Configuration::get_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
ACE_CString& value)
{
if (this->config_ == 0)
@@ -236,7 +236,7 @@ Repository_Configuration::get_string_value (const ACE_Configuration_Section_Key&
int
Repository_Configuration::get_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
u_int& value)
{
if (this->config_ == 0)
diff --git a/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.h b/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.h
index 64ef12b533b..786cdcd9cd4 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.h
+++ b/TAO/orbsvcs/ImplRepo_Service/Repository_Configuration.h
@@ -30,7 +30,7 @@ class Repository_Configuration
public:
/// Default Constructor
- Repository_Configuration (ACE_TCHAR *repository_mode);
+ Repository_Configuration (const char *repository_mode);
/// Destructor
~Repository_Configuration ();
@@ -41,14 +41,14 @@ class Repository_Configuration
int open ();
/// opens a configuration based on a file name
- int open (const ACE_TCHAR* file_name);
+ int open (const char* file_name);
int open_section (const ACE_Configuration_Section_Key& base,
- const ACE_TCHAR* sub_section,
+ const char* sub_section,
int create, ACE_Configuration_Section_Key& result);
int remove_section (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* sub_section,
+ const char* sub_section,
int recursive);
int enumerate_sections (const ACE_Configuration_Section_Key& key,
@@ -56,19 +56,19 @@ class Repository_Configuration
ACE_CString& name);
int set_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
const ACE_CString& value);
int set_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
u_int value);
int get_string_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
ACE_CString& value);
int get_integer_value (const ACE_Configuration_Section_Key& key,
- const ACE_TCHAR* name,
+ const char* name,
u_int& value);
private:
diff --git a/TAO/orbsvcs/ImplRepo_Service/Server_Repository.cpp b/TAO/orbsvcs/ImplRepo_Service/Server_Repository.cpp
index e488d03638a..1eabc37db7e 100644
--- a/TAO/orbsvcs/ImplRepo_Service/Server_Repository.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/Server_Repository.cpp
@@ -216,6 +216,8 @@ Server_Repository::add (
ACE_OS::fprintf (fp,
server_info.c_str ());
ACE_OS::fclose (fp);
+
+ return 0;
}
}
@@ -545,7 +547,7 @@ Server_Repository::remove (const ACE_CString POA_name)
FILE *fp = ACE_OS::fopen (filename, "r");
/// Have a temporary file
- ACE_TCHAR *temp_file = "temporary_file";
+ CORBA::String_var temp_file = "temporary_file";
FILE *fp_temp = ACE_OS::fopen (temp_file, "w");
@@ -597,7 +599,7 @@ Server_Repository::remove (const ACE_CString POA_name)
ACE_OS::fclose (fp);
ACE_OS::fclose (fp_temp);
ACE_OS::unlink (temp_file);
-
+ return 0;
}
/*
/// There is no support for DTD in the XML parser as of
diff --git a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp
index 43c51365026..776d42a4dbe 100644
--- a/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp
+++ b/TAO/orbsvcs/ImplRepo_Service/tao_imr_i.cpp
@@ -821,7 +821,8 @@ TAO_IMR_Op_IOR::run (void)
}
CORBA::String_var imr_str =
- this->imr_locator_->_stubobj ()->profile_in_use ()->to_string (ACE_ENV_ARG_PARAMETER);
+ this->imr_locator_->_stubobj ()->
+ profile_in_use ()->to_string (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_TRY_CHECK;
// Search for "corbaloc:" alone, without the protocol. This code