diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-03-15 10:06:45 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-03-15 10:06:45 +0000 |
commit | 2f982f8647e1947476d1ed59547db5a66bd0df6e (patch) | |
tree | e682054fc676e2a35903c6d8c0e10a573e31b80e /cpp/src/Ice/Proxy.cpp | |
parent | adding SSL support (diff) | |
download | ice-2f982f8647e1947476d1ed59547db5a66bd0df6e.tar.bz2 ice-2f982f8647e1947476d1ed59547db5a66bd0df6e.tar.xz ice-2f982f8647e1947476d1ed59547db5a66bd0df6e.zip |
Fixes for bug 897.
Diffstat (limited to 'cpp/src/Ice/Proxy.cpp')
-rw-r--r-- | cpp/src/Ice/Proxy.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/cpp/src/Ice/Proxy.cpp b/cpp/src/Ice/Proxy.cpp index d450f00bc95..253f5909657 100644 --- a/cpp/src/Ice/Proxy.cpp +++ b/cpp/src/Ice/Proxy.cpp @@ -735,7 +735,8 @@ IceProxy::Ice::Object::ice_connection() try { Handle< ::IceDelegate::Ice::Object> __del = __getDelegate(); - return __del->ice_connection(); + bool compress; + return __del->__getConnection(compress); } catch(const LocalException& __ex) { @@ -777,6 +778,12 @@ IceProxy::Ice::Object::__copyFrom(const ObjectPrx& from) if(_reference->getCacheConnection()) { + // + // The _delegate attribute is only used if "cache connection" + // is enabled. If it's not enabled, we don't keep track of the + // delegate -- a new delegate is created for each invocations. + // + if(delegateD) { Handle< ::IceDelegateD::Ice::Object> delegate = __createDelegateD(); @@ -931,6 +938,11 @@ IceProxy::Ice::Object::__getDelegate() if(_reference->getCacheConnection()) { + // + // The _delegate attribute is only used if "cache connection" + // is enabled. If it's not enabled, we don't keep track of the + // delegate -- a new delegate is created for each invocations. + // _delegate = delegate; } @@ -1133,9 +1145,10 @@ IceDelegateM::Ice::Object::ice_invoke(const string& operation, return ok; } -ConnectionPtr -IceDelegateM::Ice::Object::ice_connection() +ConnectionIPtr +IceDelegateM::Ice::Object::__getConnection(bool& compress) const { + compress = __compress; return __connection; } @@ -1238,8 +1251,8 @@ IceDelegateD::Ice::Object::ice_invoke(const string&, return false; } -ConnectionPtr -IceDelegateD::Ice::Object::ice_connection() +ConnectionIPtr +IceDelegateD::Ice::Object::__getConnection(bool&) const { throw CollocationOptimizationException(__FILE__, __LINE__); return 0; |