summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2013-01-15 10:33:18 +0100
committerBenoit Foucher <benoit@zeroc.com>2013-01-15 10:33:18 +0100
commit9ee1bf93d1837e48ccb8b93d5b219bf48a1ba909 (patch)
tree387bf0e45be6e75e2af2fcf36eb7588000578e2c /cpp/src
parentFixed add-in unexpected exception (diff)
downloadice-9ee1bf93d1837e48ccb8b93d5b219bf48a1ba909.tar.bz2
ice-9ee1bf93d1837e48ccb8b93d5b219bf48a1ba909.tar.xz
ice-9ee1bf93d1837e48ccb8b93d5b219bf48a1ba909.zip
Fixed ICE-5126 - Improved client side encoding checks
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/LocatorInfo.cpp6
-rw-r--r--cpp/src/Ice/Outgoing.cpp2
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp2
-rw-r--r--cpp/src/IceGrid/LocatorI.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/Ice/LocatorInfo.cpp b/cpp/src/Ice/LocatorInfo.cpp
index 315bfdc33c6..6e51363f5ff 100644
--- a/cpp/src/Ice/LocatorInfo.cpp
+++ b/cpp/src/Ice/LocatorInfo.cpp
@@ -324,9 +324,9 @@ IceInternal::LocatorInfo::RequestCallback::response(const LocatorInfoPtr& locato
if(_ref->isWellKnown() && !isSupported(_ref->getEncoding(), r->getEncoding()))
{
//
- // If a well-known proxy and the returned proxy encoding isn't
- // supported, we're done: there are no compatible endpoints
- // we can use.
+ // If a well-known proxy and the returned proxy encoding
+ // isn't supported, we're done: there's no compatible
+ // endpoint we can use.
//
}
else if(!r->isIndirect())
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp
index 4f75c9957e1..51f41bedd2b 100644
--- a/cpp/src/Ice/Outgoing.cpp
+++ b/cpp/src/Ice/Outgoing.cpp
@@ -87,7 +87,7 @@ IceInternal::Outgoing::Outgoing(RequestHandler* handler, const string& operation
_handler(handler),
_observer(observer),
_state(StateUnsent),
- _encoding(handler->getReference()->getEncoding()),
+ _encoding(checkForCompatibleEncoding(handler->getReference()->getEncoding())),
_is(handler->getReference()->getInstance().get(), Ice::currentProtocolEncoding),
_os(handler->getReference()->getInstance().get(), Ice::currentProtocolEncoding),
_sent(false)
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index 5ffa11d3b41..04e9eabdc02 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -426,7 +426,7 @@ IceInternal::OutgoingAsync::OutgoingAsync(const ObjectPrx& prx,
const Ice::LocalObjectPtr& cookie) :
AsyncResult(prx->ice_getCommunicator(), prx->__reference()->getInstance(), operation, delegate, cookie),
_proxy(prx),
- _encoding(prx->__reference()->getEncoding())
+ _encoding(checkForCompatibleEncoding(prx->__reference()->getEncoding()))
{
}
diff --git a/cpp/src/IceGrid/LocatorI.cpp b/cpp/src/IceGrid/LocatorI.cpp
index 2ebc6fbc22a..798f207dfab 100644
--- a/cpp/src/IceGrid/LocatorI.cpp
+++ b/cpp/src/IceGrid/LocatorI.cpp
@@ -187,7 +187,7 @@ public:
//
// Ensure the server supports the request encoding.
//
- if(proxy->ice_getEncodingVersion() < _encoding)
+ if(!IceInternal::isSupported(_encoding, proxy->ice_getEncodingVersion()))
{
exception(id, Ice::UnsupportedEncodingException(__FILE__,
__LINE__,