summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-05-15 11:49:08 +0000
committerMarc Laukien <marc@zeroc.com>2002-05-15 11:49:08 +0000
commit8afc25bd188b7fcbdc6f9eb92192c45f573e586b (patch)
treebd14c903efd8a04e83b4be6f66de3aa4600879af /cpp/src
parentuse new PluginInitializationException (diff)
downloadice-8afc25bd188b7fcbdc6f9eb92192c45f573e586b.tar.bz2
ice-8afc25bd188b7fcbdc6f9eb92192c45f573e586b.tar.xz
ice-8afc25bd188b7fcbdc6f9eb92192c45f573e586b.zip
icepatch mutex upgrade fix
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IcePatch/IcePatchI.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/cpp/src/IcePatch/IcePatchI.cpp b/cpp/src/IcePatch/IcePatchI.cpp
index 6b12e935328..dd9de9b2c35 100644
--- a/cpp/src/IcePatch/IcePatchI.cpp
+++ b/cpp/src/IcePatch/IcePatchI.cpp
@@ -49,6 +49,7 @@ IcePatch::DirectoryI::getContents(const Ice::Current& current)
try
{
IceUtil::RWRecMutex::TryRLock sync(_globalMutex, _busyTimeout);
+ bool syncUpgraded = false;
string path = identityToPath(current.identity);
StringSeq paths = readDirectory(path);
filteredPaths.reserve(paths.size() / 3);
@@ -60,7 +61,11 @@ IcePatch::DirectoryI::getContents(const Ice::Current& current)
equal_range(paths.begin(), paths.end(), removeSuffix(*p));
if (r.first == r.second)
{
- sync.timedUpgrade(_busyTimeout);
+ if (!syncUpgraded)
+ {
+ sync.timedUpgrade(_busyTimeout);
+ syncUpgraded = true;
+ }
StringSeq paths2 = readDirectory(path);
pair<StringSeq::const_iterator, StringSeq::const_iterator> r2 =
equal_range(paths2.begin(), paths2.end(), removeSuffix(*p));