summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Reference.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2006-08-09 14:58:01 +0000
committerDwayne Boone <dwayne@zeroc.com>2006-08-09 14:58:01 +0000
commit3f862089b748741b30e343d2051a4747a3bff2f2 (patch)
tree18d1dde1504e2d510a24f4d55aeee21bfea7c04f /cpp/src/Ice/Reference.cpp
parentfixing bug 1291 (diff)
downloadice-3f862089b748741b30e343d2051a4747a3bff2f2.tar.bz2
ice-3f862089b748741b30e343d2051a4747a3bff2f2.tar.xz
ice-3f862089b748741b30e343d2051a4747a3bff2f2.zip
Borland C++Builder port mass commit
Diffstat (limited to 'cpp/src/Ice/Reference.cpp')
-rw-r--r--cpp/src/Ice/Reference.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index 169a5c71a0c..dffa814cee1 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -1590,17 +1590,26 @@ IceInternal::IndirectReference::getConnection(bool& comp) const
if(!getRouterInfo())
{
assert(_locatorInfo);
- const IndirectReferencePtr self = const_cast<IndirectReference*>(this);
- _locatorInfo->clearCache(self);
+
+ // COMPILERFIX: Braces needed to prevent BCB from causing Reference refCount from
+ // being decremented twice when loop continues.
+ {
+ const IndirectReferencePtr self = const_cast<IndirectReference*>(this);
+ _locatorInfo->clearCache(self);
+ }
if(cached)
{
- TraceLevelsPtr traceLevels = getInstance()->traceLevels();
- if(traceLevels->retry >= 2)
+ // COMPILERFIX: Braces needed to prevent BCB from causing TraceLevels refCount from
+ // being decremented twice when loop continues.
{
- Trace out(getInstance()->initializationData().logger, traceLevels->retryCat);
- out << "connection to cached endpoints failed\n"
- << "removing endpoints from cache and trying one more time\n" << ex;
+ TraceLevelsPtr traceLevels = getInstance()->traceLevels();
+ if(traceLevels->retry >= 2)
+ {
+ Trace out(getInstance()->initializationData().logger, traceLevels->retryCat);
+ out << "connection to cached endpoints failed\n"
+ << "removing endpoints from cache and trying one more time\n" << ex;
+ }
}
continue;
}