diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-02-12 02:38:05 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-02-12 02:38:05 +0000 |
commit | 3bbb2b0b24b86982fb89f5f9481ec37a9e122814 (patch) | |
tree | c10a9f0cf285abf6a6d6b47146d095a0ae4dfb6f /TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp | |
parent | 4719c533006ce0209b0265f373f27e41e039e1a4 (diff) | |
download | ATCD-3bbb2b0b24b86982fb89f5f9481ec37a9e122814.tar.gz |
ChangeLogTag:Sun Feb 11 18:33:47 2001 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp')
-rw-r--r-- | TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp b/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp index 349607547cf..f0b2be8b60f 100644 --- a/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp +++ b/TAO/orbsvcs/tests/ImplRepo/nestea_i.cpp @@ -2,7 +2,9 @@ #include "nestea_i.h" #include "tao/corba.h" +#include "ace/FILE_Addr.h" #include "ace/FILE_Connector.h" +#include "ace/FILE_IO.h" const size_t MAX_UINT32_STR_LEN = 11; // Largest UINT32 is 8589934591 + NUL is 11 characters @@ -111,7 +113,17 @@ int Nestea_i::save_data (void) { ACE_FILE_IO file; - ACE_FILE_Addr filename (this->data_filename_); + ACE_FILE_Connector connector; + + if (connector.connect (file, + ACE_FILE_Addr (this->data_filename_), + 0, + ACE_Addr::sap_any) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n to %s", + "connect", + this->data_filename_), + -1); char str[MAX_UINT32_STR_LEN]; @@ -127,11 +139,21 @@ int Nestea_i::load_data (void) { ACE_FILE_IO file; - ACE_FILE_Addr filename ("nestea.dat"); + ACE_FILE_Connector connector; + + if (connector.connect (file, + ACE_FILE_Addr (this->data_filename_), + 0, + ACE_Addr::sap_any) == -1) + ACE_ERROR_RETURN ((LM_ERROR, + "%p\n to %s", + "connect", + this->data_filename_), + -1); - char str[12]; + char str[MAX_UINT32_STR_LEN]; - int len = file.recv (str, ACE_OS::strlen (str) + 1); + int len = file.recv (str, MAX_UINT32_STR_LEN); str[len] = 0; if (len > 0) |