From de13e47f53060b7cd5fe66a25f035ec1c61907c3 Mon Sep 17 00:00:00 2001 From: sjiang Date: Tue, 11 Jul 2006 23:22:59 +0000 Subject: ChangeLog Tag: Tue Jul 11 23:19:58 UTC 2006 Shanshan Jiang --- .../RepositoryManager/RepositoryManager_Impl.cpp | 41 +++------------------- 1 file changed, 5 insertions(+), 36 deletions(-) (limited to 'TAO/CIAO/DAnCE/RepositoryManager/RepositoryManager_Impl.cpp') 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 (package_path.c_str ()), const_cast (this->install_root_.c_str ()), false //not verbose -- cgit v1.2.1