summaryrefslogtreecommitdiff
path: root/ace/Naming_Context.cpp
diff options
context:
space:
mode:
authorbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-28 19:41:17 +0000
committerbrunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-02-28 19:41:17 +0000
commit0527575ce2c1ee464d859fd48caaa0423340580e (patch)
tree520e9727457223d12bb10a84244636523f7b4a40 /ace/Naming_Context.cpp
parentaa1ea58396cc4cbdad66e8ebea4a3b3806dc135f (diff)
downloadATCD-0527575ce2c1ee464d859fd48caaa0423340580e.tar.gz
ChangeLogTag:Mon Feb 28 09:20:27 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'ace/Naming_Context.cpp')
-rw-r--r--ace/Naming_Context.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/ace/Naming_Context.cpp b/ace/Naming_Context.cpp
index 2328c464612..949609923be 100644
--- a/ace/Naming_Context.cpp
+++ b/ace/Naming_Context.cpp
@@ -409,12 +409,26 @@ ACE_Name_Options::ACE_Name_Options (void)
use_registry_ (0),
nameserver_port_ (ACE_DEFAULT_SERVER_PORT),
nameserver_host_ (ACE_OS::strdup (ACE_DEFAULT_SERVER_HOST)),
- namespace_dir_ (ACE_OS::strdup (ACE_DEFAULT_NAMESPACE_DIR)),
process_name_ (0),
database_ (ACE_OS::strdup (ACE_DEFAULT_LOCALNAME)),
base_address_ (ACE_DEFAULT_BASE_ADDR)
{
ACE_TRACE ("ACE_Name_Options::ACE_Name_Options");
+
+#if defined (ACE_DEFAULT_NAMESPACE_DIR)
+ this->namespace_dir_ = ACE_OS::strdup (ACE_DEFAULT_NAMESPACE_DIR);
+#else /* ACE_DEFAULT_NAMESPACE_DIR */
+ this->namespace_dir_ = ACE_static_cast (TCHAR *, ACE_OS::malloc (MAXPATHLEN + 1));
+
+ if (ACE::get_temp_dir (this->namespace_dir_, MAXPATHLEN) == -1)
+ {
+ ACE_ERROR ((LM_ERROR,
+ "Temporary path too long, "
+ "defaulting to current directory\n"));
+ ACE_OS::strcat (this->namespace_dir_, ACE_TEXT ("."));
+ ACE_OS::strcat (this->namespace_dir_, ACE_DIRECTORY_SEPARATOR_STR);
+ }
+#endif /* ACE_DEFAULT_NAMESPACE_DIR */
}
ACE_Name_Options::~ACE_Name_Options (void)