diff options
author | sjiang <sjiang@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-07-11 23:22:59 +0000 |
---|---|---|
committer | sjiang <sjiang@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-07-11 23:22:59 +0000 |
commit | de13e47f53060b7cd5fe66a25f035ec1c61907c3 (patch) | |
tree | fb4a167aa293ff25392aa286e9ae9e4245bb93bc /TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp | |
parent | 46b074c075586ba3f2e939ab8355d4bf9e709b35 (diff) | |
download | ATCD-de13e47f53060b7cd5fe66a25f035ec1c61907c3.tar.gz |
ChangeLog Tag: Tue Jul 11 23:19:58 UTC 2006 Shanshan Jiang <shanshan.jiang@vanderbilt.edu>
Diffstat (limited to 'TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp')
-rw-r--r-- | TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp index 3e6f5f9bb12..7ac435a5443 100644 --- a/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp +++ b/TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp @@ -67,6 +67,8 @@ CIAO_RepositoryManagerDaemon_i::CIAO_RepositoryManagerDaemon_i //form the path this->HTTP_server_ += server; this->HTTP_server_ += "/"; + this->HTTP_server_ += install_path; + this->HTTP_server_ += "/"; //create directory in which the packages will be stored ACE_OS::mkdir(install_path.c_str ()); @@ -272,25 +274,8 @@ void CIAO_RepositoryManagerDaemon_i::installPackage ( } else { - CORBA::Octet* file = 0; - - //read the package from disk and store in the RM directory - //see if you can substiture this with a memory mapped file - //for better perofrmance (mimic zero copy here) - file = RM_Helper::read_from_disk (location, length); - - if (!file) + if (!RM_Helper::copy_from_disk_to_disk (location, package_path.c_str ())) ACE_THROW (CORBA::INTERNAL ()); - - //Store the package in the local RM dir for future retrieval - if (!RM_Helper::write_to_disk (package_path.c_str (), file, length)) - { - delete file; - ACE_THROW (CORBA::INTERNAL ()); - } - - //NOTE: MEMORY LEAK UNLESS delete file; change to Auto_Ptr - delete file; } @@ -491,27 +476,11 @@ void CIAO_RepositoryManagerDaemon_i::createPackage ( } else { - CORBA::Octet* file = 0; - - //read the package from disk and store in the RM directory - //see if you can substiture this with a memory mapped file - //for better perofrmance (mimic zero copy here) - file = RM_Helper::read_from_disk (baseLocation, length); - - if (!file) - ACE_THROW (CORBA::INTERNAL ()); - - //Store the package in the local RM dir for future retrieval - if (!RM_Helper::write_to_disk (package_path.c_str (), file, length)) - { - delete file; + if (!RM_Helper::copy_from_disk_to_disk (baseLocation, package_path.c_str ())) ACE_THROW (CORBA::INTERNAL ()); - } - - //NOTE: MEMORY LEAK UNLESS delete file; change to Auto_Ptr - delete file; } + ZIP_Wrapper::uncompress (const_cast<char*> (package_path.c_str ()), const_cast<char*> (this->install_root_.c_str ()), false //not verbose |