diff options
author | Matthew Newhook <matthew@zeroc.com> | 2009-08-07 18:01:43 +0800 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2009-08-07 18:01:43 +0800 |
commit | 5c9e6e5d3d1873ea232bf05ed2f6be8d290c8583 (patch) | |
tree | 66b739dff9ee9cbdc113a158c30ef80ae84ac218 /cpp/src/IcePatch2/ClientUtil.cpp | |
parent | Revert "Changes for bug 3962 and 4714" (diff) | |
download | ice-5c9e6e5d3d1873ea232bf05ed2f6be8d290c8583.tar.bz2 ice-5c9e6e5d3d1873ea232bf05ed2f6be8d290c8583.tar.xz ice-5c9e6e5d3d1873ea232bf05ed2f6be8d290c8583.zip |
merged in both of Jose's 4071 fixes.
Diffstat (limited to 'cpp/src/IcePatch2/ClientUtil.cpp')
-rw-r--r-- | cpp/src/IcePatch2/ClientUtil.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/cpp/src/IcePatch2/ClientUtil.cpp b/cpp/src/IcePatch2/ClientUtil.cpp index d2198c5d5ba..364be6b8190 100644 --- a/cpp/src/IcePatch2/ClientUtil.cpp +++ b/cpp/src/IcePatch2/ClientUtil.cpp @@ -199,6 +199,9 @@ IcePatch2::Patcher::~Patcher() { } +namespace +{ + class PatcherGetFileInfoSeqCB : public GetFileInfoSeqCB { public: @@ -291,6 +294,8 @@ private: typedef IceUtil::Handle<AMIGetFileInfoSeq> AMIGetFileInfoSeqPtr; +} + bool IcePatch2::Patcher::prepare() { @@ -454,7 +459,7 @@ IcePatch2::Patcher::prepare() sort(_updateFlags.begin(), _updateFlags.end(), FileInfoLess()); string pathLog = simplify(_dataDir + '/' + logFile); - _log = OS::fopen(pathLog, "w"); + _log = IceInternal::OS::fopen(pathLog, "w"); if(!_log) { throw "cannot open `" + pathLog + "' for writing:\n" + IceUtilInternal::lastErrorToString(); @@ -615,7 +620,7 @@ IcePatch2::Patcher::init(const FileServerPrx& server) if(!IceUtilInternal::isAbsolutePath(_dataDir)) { string cwd; - if(OS::getcwd(cwd) != 0) + if(IceInternal::OS::getcwd(cwd) != 0) { throw "cannot get the current directory:\n" + IceUtilInternal::lastErrorToString(); } @@ -714,6 +719,9 @@ IcePatch2::Patcher::updateFiles(const FileInfoSeq& files) return result; } +namespace +{ + class AMIGetFileCompressed : public AMI_FileServer_getFileCompressed, public IceUtil::Monitor<IceUtil::Mutex> { public: @@ -774,6 +782,8 @@ private: typedef IceUtil::Handle<AMIGetFileCompressed> AMIGetFileCompressedPtr; +} + bool IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const DecompressorPtr& decompressor) { @@ -813,7 +823,7 @@ IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const Decompre if(p->size == 0) { string path = simplify(_dataDir + '/' + p->path); - FILE* fp = OS::fopen(path, "wb"); + FILE* fp = IceInternal::OS::fopen(path, "wb"); if(fp == 0) { throw "cannot open `" + path +"' for writing:\n" + IceUtilInternal::lastErrorToString(); @@ -838,7 +848,7 @@ IcePatch2::Patcher::updateFilesInternal(const FileInfoSeq& files, const Decompre { } - FILE* fileBZ2 = OS::fopen(pathBZ2, "wb"); + FILE* fileBZ2 = IceInternal::OS::fopen(pathBZ2, "wb"); if(fileBZ2 == 0) { throw "cannot open `" + pathBZ2 + "' for writing:\n" + IceUtilInternal::lastErrorToString(); |