diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-28 04:16:28 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-28 04:16:28 +0000 |
commit | 1672df68c0bdb1181369c641b0482499c51734d2 (patch) | |
tree | 792936678e861d954bb4855821cb449b73549781 /ace/Local_Name_Space_T.cpp | |
parent | a17f1a8eac42352bbc199ee1f615cddf8006ef48 (diff) | |
download | ATCD-1672df68c0bdb1181369c641b0482499c51734d2.tar.gz |
*** empty log message ***
Diffstat (limited to 'ace/Local_Name_Space_T.cpp')
-rw-r--r-- | ace/Local_Name_Space_T.cpp | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 8478c390fe8..6f314beb30e 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -364,10 +364,11 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::create_manager_i (void) ACE_TRACE ("ACE_Local_Name_Space::create_manager"); // Get directory name LPCTSTR dir = this->name_options_->namespace_dir (); + LPCTSTR database = this->name_options_->database (); // Use process name as the file name. size_t len = ACE_OS::strlen (dir); - len += ACE_OS::strlen (this->name_options_->database ()) + 1; + len += ACE_OS::strlen (database) + 1; if (len >= MAXNAMELEN) { @@ -377,20 +378,30 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, LOCK>::create_manager_i (void) ACE_OS::strcpy (this->context_file_, dir); ACE_OS::strcat (this->context_file_, ACE_DIRECTORY_SEPARATOR_STR); - ACE_OS::strcat (this->context_file_, this->name_options_->database ()); + ACE_OS::strcat (this->context_file_, database); ACE_MEM_POOL_OPTIONS options (this->name_options_->base_address ()); TCHAR lock_name_for_local_name_space [MAXNAMELEN]; TCHAR lock_name_for_backing_store [MAXNAMELEN]; - LPCTSTR prefix = ACE::basename (this->context_file_, - ACE_DIRECTORY_SEPARATOR_CHAR); - - ACE_OS::strcpy (lock_name_for_local_name_space , prefix); - ACE_OS::strcat (lock_name_for_local_name_space, "_name_space"); - - ACE_OS::strcpy (lock_name_for_backing_store, prefix); - ACE_OS::strcat (lock_name_for_backing_store, "_backing_store"); + LPCTSTR postfix = database; + + size_t length = 0; + length = sizeof lock_name_for_local_name_space / sizeof TCHAR; + ACE_OS::strncpy (lock_name_for_local_name_space, + __TEXT ("name_space_"), + length); + ACE_OS::strcat (lock_name_for_local_name_space, + postfix, + length - ACE_OS::strlen (__TEXT ("name_space_"))); + + length = sizeof lock_name_for_backing_store / sizeof TCHAR; + ACE_OS::strncpy (lock_name_for_local_backing_store, + __TEXT ("backing_store_"), + length); + ACE_OS::strcat (lock_name_for_backing_store, + postfix, + length - ACE_OS::strlen (__TEXT ("backing_store_"))); // Create the allocator with the appropriate options. ACE_NEW_RETURN (this->allocator_, |