summaryrefslogtreecommitdiff
path: root/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp')
-rw-r--r--CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp36
1 files changed, 24 insertions, 12 deletions
diff --git a/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp b/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp
index fba4b35cef2..f4d93d3e33d 100644
--- a/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp
+++ b/CIAO/DAnCE/DomainApplicationManager/Deployment_Configuration.cpp
@@ -45,7 +45,7 @@ CIAO::Deployment_Configuration::init (const char *filename)
char* string = 0;
// Read from the file line by line
- while ((string = reader.read ('\n', '\0')) != 0)
+ while ((string = reader.read ('\n')) != 0)
{
// Search from the right to the first space
const char* ior_start = ACE_OS::strrchr (string, ' ');
@@ -54,8 +54,10 @@ CIAO::Deployment_Configuration::init (const char *filename)
// The destination is first followed by some spaces
ACE_CString destination (string, dest_end - string);
// And then the IOR
- ACE_CString ior (ior_start + 1, ACE_OS::strlen (ior_start + 1) - 1);
- if (this->deployment_info_.bind (destination.c_str (), ior.c_str ()) != 0)
+ ACE_CString ior (ior_start + 1, ACE_OS::strlen (ior_start + 1));
+ int const result =
+ this->deployment_info_.bind (destination.c_str (), ior.c_str ());
+ if (result == -1)
{
ACE_ERROR_RETURN ((LM_ERROR,
"DAnCE (%P|%t) Deployment_Configuration, "
@@ -63,12 +65,24 @@ CIAO::Deployment_Configuration::init (const char *filename)
destination.c_str ()),
-1);
}
-
- if (CIAO::debug_level () > 5)
+ else if (result == 1)
{
- ACE_DEBUG ((LM_DEBUG,
- "DAnCE (%P|%t) Deployment_Configuration, "
- "read <%s> <%s>\n", destination.c_str (), ior.c_str ()));
+ if (CIAO::debug_level () > 5)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "DAnCE (%P|%t) Deployment_Configuration.cpp, "
+ "reuse existing node in the cached map: <%s>\n" ,
+ destination.c_str ()));
+ }
+ }
+ else
+ {
+ if (CIAO::debug_level () > 5)
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ "DAnCE (%P|%t) Deployment_Configuration, "
+ "bind <%s> <%s>\n", destination.c_str (), ior.c_str ()));
+ }
}
if (first)
@@ -88,11 +102,9 @@ CIAO::Deployment_Configuration::get_node_manager_ior (const char *name) const
return this->get_default_node_manager_ior ();
ACE_Hash_Map_Entry
- <ACE_CString,
- CIAO::Deployment_Configuration::Node_Manager_Info> *entry = 0;
+ <ACE_CString, CIAO::Deployment_Configuration::Node_Manager_Info> *entry = 0;
- if (this->deployment_info_.find (ACE_CString (name),
- entry) != 0)
+ if (this->deployment_info_.find (ACE_CString (name), entry) != 0)
{
ACE_ERROR ((LM_ERROR,
"DAnCE (%P|%t) Deployment_Configuration, "