diff options
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service/Repository.cpp')
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/Repository.cpp | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/Repository.cpp b/TAO/orbsvcs/ImplRepo_Service/Repository.cpp index 48952cb727b..d85e2e0fa7e 100644 --- a/TAO/orbsvcs/ImplRepo_Service/Repository.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/Repository.cpp @@ -14,7 +14,8 @@ Server_Info::Server_Info (const ACE_TString POA_name, const ACE_TString logical_server_name, const ACE_TString startup_command, const ACE_TString working_dir) -: logical_server_name_ (logical_server_name), +: starting_up_ (0), + logical_server_name_ (logical_server_name), POA_name_ (POA_name), startup_command_ (startup_command), working_dir_ (working_dir), @@ -152,6 +153,42 @@ Server_Repository::get_running_info (const ACE_TString POA_name, return retval; } + +// Checks the starting_up_ variable in the Server_Info and +// returns the previous value or -1 if the POA_name wasn't found + +int +Server_Repository::starting_up (const ACE_TString POA_name, int new_value) +{ + Server_Info *server; + int retval = this->repository_.find (POA_name, server); + + // Only fill in data if it was found + if (retval == 0) + { + retval = server->starting_up_; + server->starting_up_ = new_value; + } + + return retval; +} + + +// Same as above but does not alter the value + +int +Server_Repository::starting_up (const ACE_TString POA_name) +{ + Server_Info *server; + int retval = this->repository_.find (POA_name, server); + + // Only fill in data if it was found + if (retval == 0) + retval = server->starting_up_; + + return retval; +} + // Removes the server from the Repository. |