diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-28 19:41:17 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-02-28 19:41:17 +0000 |
commit | 71b7d0e8aa65fb36fcee927cac4a102ac28ee0a2 (patch) | |
tree | 520e9727457223d12bb10a84244636523f7b4a40 /tests/Time_Service_Test.cpp | |
parent | 0d9d1ef62a88b42f2eab7206482b3ae32d931b81 (diff) | |
download | ATCD-71b7d0e8aa65fb36fcee927cac4a102ac28ee0a2.tar.gz |
ChangeLogTag:Mon Feb 28 09:20:27 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'tests/Time_Service_Test.cpp')
-rw-r--r-- | tests/Time_Service_Test.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/Time_Service_Test.cpp b/tests/Time_Service_Test.cpp index d88510e6076..62c7d5f4052 100644 --- a/tests/Time_Service_Test.cpp +++ b/tests/Time_Service_Test.cpp @@ -48,7 +48,28 @@ main (int, ASYS_TCHAR *[]) // the Clerk is not allowed to do a graceful shutdown. By cleaning // the backing store here, we are sure that we get a fresh start and // no garbage data from a possible aborted run - ACE_OS::unlink (ACE_DEFAULT_BACKING_STORE); + TCHAR backing_store[MAXPATHLEN + 1] + +#if defined (ACE_DEFAULT_BACKING_STORE) + // Create a temporary file. + ACE_OS::strcpy (backing_store, + ACE_DEFAULT_BACKING_STORE); +#else /* ACE_DEFAULT_BACKING_STORE */ + if (ACE::get_temp_dir (backing_store, + MAXPATHLEN - 17) == -1) // -17 for ace-malloc-XXXXXX + { + ACE_ERROR ((LM_ERROR, + "Temporary path too long, " + "defaulting to current directory\n")); + backing_store[0] = 0; + } + + // Add the filename to the end + ACE_OS::strcat (backing_store, "ace-malloc-XXXXXX"); + +#endif /* ACE_DEFAULT_BACKING_STORE */ + + ACE_OS::unlink (backing_store); LPCTSTR server_cl = APPLICATION ACE_TEXT ("server.conf"); ACE_Process_Options server_options; |