summaryrefslogtreecommitdiff
path: root/DAnCE
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2011-07-27 08:46:27 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2011-07-27 08:46:27 +0000
commit0b491512f804e15ba90689da545f599f68995d4e (patch)
tree32a5d1fc0d7c4517fa6cf1915ce8d98e10921c38 /DAnCE
parentb9f94bdb0b65970e499c86181435e79ff398e1d4 (diff)
downloadATCD-0b491512f804e15ba90689da545f599f68995d4e.tar.gz
Wed Jul 27 08:45:22 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu>
* dance/LocalityManager/Configuration/CPU_Affinity.cpp: * dance/LocalityManager/Daemon/Locality_Manager_Impl.cpp: Fixes to address crashing issues on some platforms.
Diffstat (limited to 'DAnCE')
-rw-r--r--DAnCE/ChangeLog7
-rw-r--r--DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp10
-rw-r--r--DAnCE/dance/LocalityManager/Daemon/Locality_Manager_Impl.cpp4
3 files changed, 15 insertions, 6 deletions
diff --git a/DAnCE/ChangeLog b/DAnCE/ChangeLog
index 5674a3325bd..5753500e700 100644
--- a/DAnCE/ChangeLog
+++ b/DAnCE/ChangeLog
@@ -1,3 +1,10 @@
+Wed Jul 27 08:45:22 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu>
+
+ * dance/LocalityManager/Configuration/CPU_Affinity.cpp:
+ * dance/LocalityManager/Daemon/Locality_Manager_Impl.cpp:
+
+ Fixes to address crashing issues on some platforms.
+
Sun Jul 10 16:21:29 UTC 2011 William R. Otte <wotte@dre.vanderbilt.edu>
* docs/Error_Documentation/index.html:
diff --git a/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp b/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp
index 6fcf1971fb0..e09b7d2fcc3 100644
--- a/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp
+++ b/DAnCE/dance/LocalityManager/Configuration/CPU_Affinity.cpp
@@ -36,9 +36,9 @@ namespace DAnCE
{
#if defined (LINUX_VERSION_CODE) && defined (KERNEL_VERSION)
# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,8))
- char *affinity;
+ const char *extracted_affinity;
- if (! (prop.value >>= CORBA::Any::to_string (affinity, 0)))
+ if (! (prop.value >>= CORBA::Any::to_string (extracted_affinity, 0)))
{
DANCE_ERROR (DANCE_LOG_TERMINAL_ERROR,
(LM_ERROR, DLINFO
@@ -47,8 +47,8 @@ namespace DAnCE
throw ::Deployment::StartError (prop.name.in (),
"Unable to extract CPU affinity string");
}
-
- ACE_Auto_Basic_Array_Ptr<char> safe_affinity (affinity);
+
+ char *affinity = ACE_OS::strdup (extracted_affinity);
ACE_Tokenizer_T<char> tokenizer(affinity);
tokenizer.delimiter (',');
@@ -81,6 +81,8 @@ namespace DAnCE
"All affinity values should be greater than 0");
}
}
+
+ ACE_OS::free (affinity);
pid_t const pid = ACE_OS::getpid ();
diff --git a/DAnCE/dance/LocalityManager/Daemon/Locality_Manager_Impl.cpp b/DAnCE/dance/LocalityManager/Daemon/Locality_Manager_Impl.cpp
index 43f1d83a874..4395b7c4350 100644
--- a/DAnCE/dance/LocalityManager/Daemon/Locality_Manager_Impl.cpp
+++ b/DAnCE/dance/LocalityManager/Daemon/Locality_Manager_Impl.cpp
@@ -58,7 +58,7 @@ namespace DAnCE
props->length ()));
this->props_ = props;
- PLUGIN_MANAGER::instance ()->set_configuration (*props);
+ PLUGIN_MANAGER::instance ()->set_configuration (this->props_.in ());
}
PLUGIN_MANAGER::instance ()->set_orb (this->orb_.in ());
@@ -83,7 +83,7 @@ namespace DAnCE
config.load_from_text_file (ACE_TEXT_CHAR_TO_TCHAR (i->c_str ()));
}
- if (this->props_)
+ if (CORBA::is_nil (this->props_))
{
if (DAnCE::Utility::get_property_value (DAnCE::LOCALITY_TIMEOUT,
*this->props_,